Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, base_structure):
IterableModel.__init__(self, base_structure)
# Make sure that our base_structure refers to the "lowest" object
# in the tree
while True:
if self.base_structure.prev:
self.base_structure = self.base_structure.prev.contents
else:
break