Unexpected result for list operator "+="

Thomas Wouters thomas at xs4all.net
Thu Jan 4 11:58:55 EST 2001


On Thu, Jan 04, 2001 at 03:12:43PM +0100, Alex Martelli wrote:
> "Fredrik Lundh" <fredrik at effbot.org> wrote in message
> news:aDW46.2901$AH6.510940 at newsc.telia.net...
>     [snip]
> > 1) if anyone can figure out where list += is documented,
> > let us know...
> 
> I only see a very brief & indirect mention in passing at 3.3.4
> in the Python Reference Manual -- online version's URL
> http://www.python.org/doc/current/ref/sequence-types.html
> 
> """
> Finally, sequence types should implement addition (meaning concatenation)
> [snip]
> by defining the methods __add__(), __radd__(), __iadd__(),
> """
> (it continues by saying the methods are 'described below',
> but, they aren't).
> 
> Still better than the docs for numeric types -- this is the
> ONLY mention I can find of __iadd__ *anywhere* in the docs.

*That* is fixed in the newer docs. If you find a good place to add a list's
*=/+=, let me know. (Is the non-augmented * or + documented anywhere ?)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list