[ python-Bugs-848812 ] Inconsistent list.__add__/__addi__.
SourceForge.net
noreply at sourceforge.net
Tue Nov 25 04:50:39 EST 2003
Bugs item #848812, was opened at 2003-11-25 04:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=848812&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Fincher (jemfinch)
Assigned to: Nobody/Anonymous (nobody)
Summary: Inconsistent list.__add__/__addi__.
Initial Comment:
>>> L = [1,2,3]
>>> L + (1,2,3)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: can only concatenate list (not "tuple") to list
>>> L += (1,2,3)
>>> L
[1, 2, 3, 1, 2, 3]
I've always been somewhat annoyed that list.__add__
didn't accept any iterable (just lists), but to have += accept
any iterable but not + is just plain inconsistent.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=848812&group_id=5470
More information about the Python-bugs-list
mailing list