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 ncoghlan
Recipients Carl.Friedrich.Bolz, Trundle, arigo, daniel.urban, eric.araujo, meador.inge, ncoghlan, terry.reedy
Date 2011-03-15.14:01:06
SpamBayes Score 2.99148e-09
Marked as misclassified No
Message-id <1300197669.0.0.313235359266.issue11477@psf.upfronthosting.co.za>
In-reply-to
Content
Armin: yeah, I learned better in the course of trying to fix this misbehaviour in CPython. I've adjusted assorted sq_concat methods to return NotImplemented in the sandbox where I'm working on this, along with modifying abstract.c to correctly cope with that.

Terry: the slot signatures vary, so copying function pointers around isn't really viable. I'm just fixing abstract.c to call the slots in the right order.

The fun part is that historically, CPython didn't check for NotImplemented returns from sq_concat and sq_repeat, so those methods are all written to raise TypeError explicitly, which breaks delegation to __radd__ methods (i.e. exactly the same thing Armin fixed in PyPy).

As far as 2.7 and 3.2 go, I'm thinking a Py3k warning in the next 2.7 release and a CompatibilityWarning (once we have it) in the next 3.2 will be a possibility. However, I want to finish the patch and see the magnitude of the change before deciding what we do with the maintenance versions.
History
Date User Action Args
2011-03-15 14:01:09ncoghlansetrecipients: + ncoghlan, arigo, terry.reedy, Carl.Friedrich.Bolz, eric.araujo, Trundle, meador.inge, daniel.urban
2011-03-15 14:01:08ncoghlansetmessageid: <1300197669.0.0.313235359266.issue11477@psf.upfronthosting.co.za>
2011-03-15 14:01:06ncoghlanlinkissue11477 messages
2011-03-15 14:01:06ncoghlancreate