Created
January 7, 2016 14:38
-
-
Save edofic/56eae1571c66e4461212 to your computer and use it in GitHub Desktop.
computed properties on python modules
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
import sys | |
class Hack(object): | |
bar = 2 | |
@property | |
def foo(self): | |
return 1 | |
sys.modules['hack'] = Hack() |
Author
edofic
commented
Jan 7, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment