Skip to content

Instantly share code, notes, and snippets.

@sharth
Created November 18, 2013 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharth/7536465 to your computer and use it in GitHub Desktop.
Save sharth/7536465 to your computer and use it in GitHub Desktop.
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def f(x): return f.value
...
>>> def g(x): return g.value
...
>>> f.value = 4
>>> g.value = 5
>>> f(3)
4
>>> g(3)
5
>>> f.__code__.co_code == g.__code__.co_code
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment