Created
June 13, 2018 04:26
-
-
Save IuryAlves/b8718fc16f50916e55b506fd7f9b1a5b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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