preferred syntax for list extend?

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Apr 22 21:42:13 EDT 2002


Bernhard Herzog wrote:
> 
> Why would you want to implement __iadd__ for immutable objects?

So that, e.g. i += 1 works when i is an integer.

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list