One last shot at the Augmented Assignment PEP
Rainer Deyke
root at rainerdeyke.com
Wed Sep 13 20:44:30 EDT 2000
More information about the Python-list mailing list
Wed Sep 13 20:44:30 EDT 2000
- Previous message (by thread): One last shot at the Augmented Assignment PEP
- Next message (by thread): One last shot at the Augmented Assignment PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Huaiyu Zhu" <hzhu at users.sourceforge.net> wrote in message news:slrn8s04pv.9on.hzhu at rocket.knowledgetrack.com... > How about using = for assignment and ! for augmentation? > > a = b = []; a += [1] # a==[1] and b==[] > a = b = []; a +! [1] # a==[1]==b > > a = b = (); a += (1,) # a==(1,) and b==() > a = b = (); a +! (1,) # Error, () is immutable. This makes sense to me. -- Rainer Deyke (root at rainerdeyke.com) Shareware computer games - http://rainerdeyke.com "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
- Previous message (by thread): One last shot at the Augmented Assignment PEP
- Next message (by thread): One last shot at the Augmented Assignment PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list