Created
March 12, 2019 12:30
-
-
Save ironfroggy/3ded5f1b5b50bf5eb7c4f35802829686 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 Klass(object): | |
def stat_func(): | |
return 42 | |
_ANS = stat_func() # call the function directly first | |
stat_func = staticmethod(stat_func) # then wrap it manually | |
def method(self): | |
ret = Klass.stat_func() | |
return ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment