Skip to content

Instantly share code, notes, and snippets.

@k0001
Created May 8, 2009 20:47
Show Gist options
  • Save k0001/108999 to your computer and use it in GitHub Desktop.
Save k0001/108999 to your computer and use it in GitHub Desktop.
>>> def bar():
... bar.x = 3
...
>>>
>>> bar.x
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'function' object has no attribute 'x'
>>> bar()
>>> bar.x
3
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment