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 Sergey
Recipients Ramchandra Apte, Sergey, aleax, ethan.furman, jcea, oscarbenjamin, serhiy.storchaka, terry.reedy
Date 2013-07-11.23:57:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Steven D'Aprano noticed that there's an obscure case of:

>>> class A(list):
...     def __add__(self, other):
...         return A(super(A,self).__add__(other))
...     def __radd__(self, other):
...         return A(other) + self

>>> type( [1] + A([2]) )
<class '__main__.A'>

Is different from:

>>> type( [1].__add__(A([2])) )
<class 'list'>

To keep such an undefined behavior unchanged I updated the fastsum-special-tuplesandlists.patch to have a more strict type check.

In case somebody would like to test it, the patch is attached. It should work for both Python 2.7 and Python 3.3, and should introduce no behavior change.
Date User Action Args
2013-07-11 23:57:52Sergeysetrecipients: + Sergey, aleax, terry.reedy, jcea, ethan.furman, Ramchandra Apte, serhiy.storchaka, oscarbenjamin
2013-07-11 23:57:52Sergeysetmessageid: <>
2013-07-11 23:57:52Sergeylinkissue18305 messages
2013-07-11 23:57:52Sergeycreate