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.

classification
Title: Comparing between disparate types should raise a Py3K warning
Type: Stage:
Components: Interpreter Core Versions: Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bethard, brett.cannon, rhettinger
Priority: critical Keywords: 26backport, patch

Created on 2008-03-17 18:12 by brett.cannon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
object_compare.patch bethard, 2008-03-18 01:06
Messages (5)
msg63702 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-03-17 18:12
When you compare disparate types through something other than == and !=
a Py3K warning should be raised.
msg63734 - (view) Author: Steven Bethard (bethard) * (Python committer) Date: 2008-03-17 19:40
I'll start looking at this.
msg63757 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-03-17 20:25
Can the be done without making comparisons more expensive across the
board.  It will be bad news for Py2.6 if every single comparison gets
slowed down.
msg63834 - (view) Author: Steven Bethard (bethard) * (Python committer) Date: 2008-03-18 01:06
The code is only invoked when NotImplemented is produced. Take a look at
the attached patch to try_3way_to_rich_compare and see if you think it's
going to be too expensive.
msg63947 - (view) Author: Steven Bethard (bethard) * (Python committer) Date: 2008-03-18 17:27
Resolved in revision 61529.
History
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46595
2008-03-18 17:27:04bethardsetstatus: open -> closed
messages: + msg63947
2008-03-18 01:06:58bethardsetfiles: + object_compare.patch
keywords: + patch
messages: + msg63834
2008-03-17 20:25:55rhettingersetnosy: + rhettinger
messages: + msg63757
2008-03-17 20:15:44brett.cannonsetpriority: release blocker -> critical
2008-03-17 19:40:57bethardsetnosy: + bethard
messages: + msg63734
2008-03-17 18:12:54brett.cannoncreate