byroot/pysrt — pull request #52 by felagund (2014-05-20 12:42:41+00:00)
Title: Add parent, previous and next properties to SubRipItem

This works for me so far. However, it is for sure incomplete:

1) No testcases.
2) When SubRipItem is inserted into another SubRipFile or is removed from its original, the parent property does not change.

I also noticed that SubRipFile accepts input as a list, so one can add 1 or "bla" to it even though it does not make much sense. Maybe it would be worthwhile to override insert() append() and extend() (and remove()) methods so that they would update the parent property of added elements and would check if we are operating with SubRipItem instances and raise an error if not? What do you think?