Message166908
| 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 |
<1343665856.86.0.759867022952.issue8847@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年07月30日 16:30:56 | pitrou | set | recipients:
+ 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:56 | pitrou | set | messageid: <1343665856.86.0.759867022952.issue8847@psf.upfronthosting.co.za> |
| 2012年07月30日 16:30:56 | pitrou | link | issue8847 messages |
| 2012年07月30日 16:30:55 | pitrou | create |
|