[issue9092] static behavior of local variables

2010-06-27 Thread Mark Dickinson
Mark Dickinson added the comment: Please see the warning in this section of the tutorial: http://docs.python.org/tutorial/controlflow.html#default-argument-values -- nosy: +mark.dickinson resolution: -> invalid status: open -> closed ___ Python tra

[issue9092] static behavior of local variables

2010-06-27 Thread Konstantin
New submission from Konstantin : In [12]: def func(x=[]) : : L=x : L.append('a') : return L : In [13]: func() Out[13]: ['a'] In [14]: func() Out[14]: ['a', 'a'] In [15]: func() Out[15]: ['a', 'a', 'a'] In [16]: func() Out[16]: ['a', 'a', 'a', 'a'] In [