A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/039583.html below:

[Python-Dev] Re: accumulator display syntax

[Python-Dev] Re: accumulator display syntaxAlex Martelli aleaxit at yahoo.com
Sun Oct 26 12:51:04 EST 2003
On Sunday 26 October 2003 06:34 pm, Raymond Hettinger wrote:
   ...
> b to be Sets; however, a.union(b) allows b to be any iterable.  The
> matches the distinction between list.__iadd__() and list.extend() where
> the former requires a list argument and the latter does not.

What distinction...?

>>> x=range(3)
>>> x.__iadd__('foo')
[0, 1, 2, 'f', 'o', 'o']
>>> x
[0, 1, 2, 'f', 'o', 'o']
>>>

did you mean list.__add__()...?  list.__iadd__ IS just as permissive
as list.extend, it seems to me.


Alex


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4