|
@@ -201,8 +201,8 @@ class PersonCollection:
|
|
|
>>> carol.father = c['bob']
|
|
|
>>> c.add_person(carol)
|
|
|
Person(carol)
|
|
|
- >>> c.get_children('bob')
|
|
|
- {Person(carol), Person(alice)}
|
|
|
+ >>> sorted(c.get_children('bob'), key=lambda p: p.identifier)
|
|
|
+ [Person(alice), Person(carol)]
|
|
|
|
|
|
does not support change / removal of parents:
|
|
|
>>> carol.father = Person('other-bob')
|
|
@@ -210,8 +210,8 @@ class PersonCollection:
|
|
|
Person(carol)
|
|
|
>>> c.get_children('other-bob')
|
|
|
{Person(carol)}
|
|
|
- >>> c.get_children('bob')
|
|
|
- {Person(carol), Person(alice)}
|
|
|
+ >>> sorted(c.get_children('bob'), key=lambda p: p.identifier)
|
|
|
+ [Person(alice), Person(carol)]
|
|
|
"""
|
|
|
if isinstance(parent, str):
|
|
|
return self.__children[parent]
|