Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Attached patch fixes the cases discovered so far. It is possible that in some of these cases creation of the long object that is later discarded can be avoided by detecting small int return early, but such optimizations should probably be left for later.
Any advise on how to write a unit test? Should the unit test detect python compiled with NSMALLNEGINTS + NSMALLPOSINTS == 0 and disable identity checks? ---------- keywords: +patch Added file: http://bugs.python.org/file9776/issue2417.diff __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2417> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com