Skip to content

Instantly share code, notes, and snippets.

@tych0
Created May 14, 2013 00:48
Show Gist options
  • Save tych0/5572767 to your computer and use it in GitHub Desktop.
Save tych0/5572767 to your computer and use it in GitHub Desktop.
smitten:~/playground$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def gotcha(foo=[]): return foo
...
>>> gotcha().append(1)
>>> gotcha()
[1]
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment