#NEWLINE# def get_parents( all_parents , current ) : #NEWLINE# #INDENT# "Iterate current object's all parents." #NEWLINE# for parent in all_parents . get ( current , [ ] ) : #NEWLINE# #INDENT# ( yield parent ) #NEWLINE# for grandparent in get_parents ( all_parents , parent ) : #NEWLINE# #INDENT# ( yield grandparent )