Title: Comparing between disparate types should raise a Py3K warning
Type: Stage:
Components: Interpreter Core Versions: Python 2.6
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 2008-03-18 17:27 by bethard. This issue is now closed.

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.
Date User Action Args
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