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 pitrou
Recipients amaury.forgeotdarc, benrg, brian.curtin, eric.araujo, ishimoto, jackdied, loewis, mrabarnett, pitrou, r.david.murray, rhettinger, terry.reedy, tim.golden
Date 2012-07-30.16:30:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The exact same issue happens when concatenating a list subclass to a tuple:

>>> () + L([1,2])
[1, 2]
>>> (3,) + L([1,2])
# crash

Also, note that in this case a list is returned, not a tuple despite the first operand being a tuple. Conversely:

>>> [] + T((1,2))
(1, 2)

A tuple is returned, not a list. Which is exactly what happens when calling T.__add__:

>>> T.__add__((), T((1,2)))
(1, 2)

My intuition is that the issue is somewhere in binary_op1() (called by PyNumber_Add) in abstract.c. I can't go much further since my own builds don't exhibit the issue.

(in the end, chances are it's a MSVC compiler bug)
Date User Action Args
2012-07-30 16:30:56pitrousetrecipients: + pitrou, loewis, rhettinger, terry.reedy, ishimoto, amaury.forgeotdarc, jackdied, tim.golden, eric.araujo, mrabarnett, r.david.murray, brian.curtin, benrg
2012-07-30 16:30:56pitrousetmessageid: <>
2012-07-30 16:30:56pitroulinkissue8847 messages
2012-07-30 16:30:55pitroucreate