very good reasons?
François Pinard
pinard at iro.umontreal.ca
Sun Oct 1 18:28:44 EDT 2000
More information about the Python-list mailing list
Sun Oct 1 18:28:44 EDT 2000
- Previous message (by thread): very good reasons?
- Next message (by thread): very good reasons?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Kragen Sitaker] > You write: > > I'm not sure that `y = list(x)' returns `y' different than `x', if `x' is > > already a list, in which case the functions above would mutate operands, > > which is not welcome. Maybe (?) it would be safer to write: > It does return a copy of x if x is a list in 1.5.2. Your proposed > solution unfortunately doesn't work for tuples, which is unperlish. > > y = x[:] My suggestion about x[:] was not good. Thanks for correcting me, Kragen. -- François Pinard http://www.iro.umontreal.ca/~pinard
- Previous message (by thread): very good reasons?
- Next message (by thread): very good reasons?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list