Created
January 8, 2015 14:23
-
-
Save tef/cfa0ee85ac88ecb5bea4 to your computer and use it in GitHub Desktop.
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
$ cat foo.py | |
def foo(x): | |
return x | |
$ cat bar.py | |
from foo import foo | |
def bar(): | |
return foo.x | |
$ cat baz.py | |
from foo import foo | |
foo.x = 1 | |
import bar | |
print bar.bar() | |
$ python baz.py | |
1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment