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 georg.brandl
Recipients Mark.Shannon, georg.brandl, r.david.murray
Date 2010-09-23.19:12:03
SpamBayes Score 0.00022677511
Marked as misclassified No
Message-id <1285269126.06.0.442755481312.issue9930@psf.upfronthosting.co.za>
In-reply-to
Content
This is indeed weird.  PyNumber_Add ends up calling compare_add with the float as its first argument, which is impossible to do from Python.  And the wrap_binaryfunc_r check for subtypes means that compare.__radd__ claims it doesn't support floats either.  So from Python, it's impossible to add floats and complex numbers via __special__ methods :)

Maybe Mark wants to shed some light?
History
Date User Action Args
2010-09-23 19:12:06georg.brandlsetrecipients: + georg.brandl, r.david.murray, Mark.Shannon
2010-09-23 19:12:06georg.brandlsetmessageid: <1285269126.06.0.442755481312.issue9930@psf.upfronthosting.co.za>
2010-09-23 19:12:04georg.brandllinkissue9930 messages
2010-09-23 19:12:03georg.brandlcreate