Skip to content

Instantly share code, notes, and snippets.

@IuryAlves IuryAlves/depth.py
Created Jun 13, 2018

Embed
What would you like to do?
def get_depth(self):
parent = self.parent
depth = 0
while parent is not None:
parent = parent.parent
depth += 1
return depth
# coloca isso na classe Link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.