Created
March 1, 2012 11:26
-
-
Save jacob414/1949172 to your computer and use it in GitHub Desktop.
Simple demo of Altered States decorator
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
from altered import state | |
org = {'foo': 'foo'} | |
@state(org, foo='bar') | |
def fn(): | |
return org['foo'] | |
# prints 'bar' | |
print fn() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment