[issue9703] default param values

2010-08-29 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file18678/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue9703] default param values

2010-08-29 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file18668/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue9703] default param values

2010-08-29 Thread vladimir
vladimir added the comment: On Sat, Aug 28, 2010 at 10:24 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Rest assured: it's expected behavior. > > Thank you for your cooperation. -- Added file: http://bugs.python.org/file18678/unnamed __

[issue9703] default param values

2010-08-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: Rest assured: it's expected behavior. -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Pyth

[issue9703] default param values

2010-08-28 Thread vladimir
vladimir added the comment: On Sat, Aug 28, 2010 at 12:34 AM, Georg Brandl wrote: changes parameter value. It' would be understandable, as exmple in documentation with acumulating value of L, that changing parameter in side class affect default value in next call. But this is out of mind. D

[issue9703] default param values

2010-08-27 Thread Georg Brandl
Georg Brandl added the comment: This is by design. Parameter default values are evaluated when the function is defined, not when it is called. Therefore, by assigning the default value to an instance attribute, you are basically sharing it between instances. -- nosy: +georg.brandl r

[issue9703] default param values

2010-08-27 Thread vladimir
New submission from vladimir : This program: class t( object): def __init__(self,ime,param1=[],param2=[]): print "+++init+++" print "ime = ",ime print "param1 = ", param1 print "param2 = ", param2 print