This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gruszczy
Recipients gruszczy
Date 2011-06-11.22:02:51
SpamBayes Score 3.9691304e-08
Marked as misclassified No
Message-id <1307829771.92.0.859008661902.issue12318@psf.upfronthosting.co.za>
In-reply-to
Content
You can do this:
>>> [1] + (1,)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "tuple") to list

But you can do this:

>>> result = [1]
>>> result += (1,)
>>> result
[1, 1]


Is it the expected behaviour, that += does implicit coercion?
History
Date User Action Args
2011-06-11 22:02:52gruszczysetrecipients: + gruszczy
2011-06-11 22:02:51gruszczysetmessageid: <1307829771.92.0.859008661902.issue12318@psf.upfronthosting.co.za>
2011-06-11 22:02:51gruszczylinkissue12318 messages
2011-06-11 22:02:51gruszczycreate