Created
December 14, 2017 00:40
-
-
Save ferndot/8c65e7716c6e5d88fde309933ff8ae5b to your computer and use it in GitHub Desktop.
This file contains 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
class Goal(object): | |
name = 'Generic Goal' | |
@classmethod | |
def getConcreteClasses(cls): | |
for c in cls.__subclasses__(): | |
yield c | |
for c2 in c.getConcreteClasses(): | |
yield c2 | |
def progress(self): | |
return self.completed / self.total | |
class InfluenceGoal(Goal): | |
name = 'Influence Goal' | |
def progress(self): | |
return self.completed / self.total | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment