Created
January 12, 2017 00:56
-
-
Save xevix/3d45c526fc98af011c1a55f8b219ddd0 to your computer and use it in GitHub Desktop.
This file contains 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
def foo(a, b={}): | |
if a == 1: | |
b["oops"] = "boom" | |
return b | |
for i in xrange(3): | |
print "foo: {}".format(foo(i)) | |
# Output: | |
# foo: {} | |
# foo: {'oops': 'boom'} | |
# foo: {'oops': 'boom'} # oops... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment