python assignment

Bjorn Pettersen BPettersen at NAREX.com
Wed Jul 23 04:40:08 EDT 2003


> From: Juha Autero [mailto:Juha.Autero at iki.fi] 
> 
> "Tim Peters" <tim.one at comcast.net> writes:
> 
> > It would be very unusual (because bad design) for the __iadd__
> > method of a mutable type to return a pre-existing object, though.
> 
> I'm confused. I thought that the idea of __iadd__ is that for
> *mutable* types it modifies existing object instead of returning new
> one. So, was that a typo or are Python lists just bad desing:
[...]

"... mutable type to return a[nother] pre-existing..."
"... return a pre-existing object [besides iteself]..."

context?'ly y'rs
-- bjorn





More information about the Python-list mailing list