Skip to content

Instantly share code, notes, and snippets.

@ironfroggy
Created March 12, 2019 12:30
Show Gist options
  • Save ironfroggy/3ded5f1b5b50bf5eb7c4f35802829686 to your computer and use it in GitHub Desktop.
Save ironfroggy/3ded5f1b5b50bf5eb7c4f35802829686 to your computer and use it in GitHub Desktop.
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