[ python-Bugs-1350060 ] built-in method .__cmp__

SourceForge.net noreply at sourceforge.net
Mon Nov 7 09:55:32 CET 2005


Bugs item #1350060, was opened at 2005-11-07 08:55
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1350060&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Armin Rigo (arigo)
Assigned to: Armin Rigo (arigo)
Summary: built-in method .__cmp__

Initial Comment:
Bound methods of built-in objects have a strange
__cmp__/__hash__ combination: they compare equal only
if their __self__ are identical, but they hash based
on the hash of __self__ instead of its
_Py_HashPointer().

Built-in methods should consistently be based on the
identity *or* the equality of __self__.  For reference,
regular instance methods are based on the equality.  So
I propose to fix built-in method objects in the same
way.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1350060&group_id=5470


More information about the Python-bugs-list mailing list