Author serhiy.storchaka
Recipients Kevin Shweh, Tijs Van Oevelen, arigo, donmez, ezio.melotti, fijall, ncoghlan, r.david.murray, rhettinger, serhiy.storchaka, torsten
Date 2015-12-13.08:54:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449996852.68.0.870204393501.issue25843@psf.upfronthosting.co.za>
In-reply-to
Content
> The lowest impact fix from a code change would be to add a type equivalence check for constants as Raymond first suggested, as that only involves adding an extra check to code_richcompare: https://hg.python.org/cpython/file/tip/Objects/codeobject.c#l416

It is not so easy. (1,) and (1.0,) are equal and have the same type. To make correct type-sensitive equivalence check, you need to introduce new protocol, new special method on low level and new operator/function on high level.
History
Date User Action Args
2015-12-13 08:54:12serhiy.storchakasetrecipients: + serhiy.storchaka, arigo, rhettinger, ncoghlan, donmez, ezio.melotti, r.david.murray, torsten, fijall, Kevin Shweh, Tijs Van Oevelen
2015-12-13 08:54:12serhiy.storchakasetmessageid: <1449996852.68.0.870204393501.issue25843@psf.upfronthosting.co.za>
2015-12-13 08:54:12serhiy.storchakalinkissue25843 messages
2015-12-13 08:54:12serhiy.storchakacreate