Update docstrings for walk_children, walk_parents.
This commit is contained in:
parent
0a8a754cbc
commit
13c3a1c0e9
1 changed files with 4 additions and 1 deletions
|
@ -199,13 +199,16 @@ class GroupableMixin:
|
||||||
self.photodb._cached_frozen_children = None
|
self.photodb._cached_frozen_children = None
|
||||||
|
|
||||||
def walk_children(self):
|
def walk_children(self):
|
||||||
|
'''
|
||||||
|
Yield self and all descendants.
|
||||||
|
'''
|
||||||
yield self
|
yield self
|
||||||
for child in self.get_children():
|
for child in self.get_children():
|
||||||
yield from child.walk_children()
|
yield from child.walk_children()
|
||||||
|
|
||||||
def walk_parents(self):
|
def walk_parents(self):
|
||||||
'''
|
'''
|
||||||
Yield all ancestors in no particular order.
|
Yield all ancestors, but not self, in no particular order.
|
||||||
'''
|
'''
|
||||||
parents = self.get_parents()
|
parents = self.get_parents()
|
||||||
seen = set(parents)
|
seen = set(parents)
|
||||||
|
|
Loading…
Reference in a new issue