I\'m trying to get the top node of a chain in getTopParent(). When I print out self.name, it indeed prints out the name of the parent instance; however
getTopParent()
self.name
use return in
return
else: print( "checking %s" % self.name ) return self.owner.getTopParent()
as None is the default return Value, then it'll output:
None
checking child3 checking child2 checking child1 Got top: parent <__main__.A instance at 0xb77a628c>