Created
January 28, 2011 12:22
-
-
Save felipernb/800188 to your computer and use it in GitHub Desktop.
Where's the reference to L?
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 f(a, L=[]): | |
L.append(a) | |
return L | |
print f(1) | |
print f(2) | |
print f(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Onde fica a porra da referência para L? É uma global esdrúxula? Ou a função guarda estado :O?