Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Hi,

> It's the same function attached to two different classes.  I don't
> really buy the "implementation detail" argument - if Guido says it,
> then I don't have much choice but to accept it, but I'm going to
> argue about it with anyone else. :)

I understand that :-)

> Py3k may be different, but I'm
> not going to talk about Py3k here because I'm only interested
> in the Python 2.x behavior.

Granted, but Python 2.6 (and subsequent 2.x versions) strives to make it easier
to port code to 3.x by gradually reducing compatibility issues. Your proposal to
change unbound method __eq__ behaviour would, on the contrary, add another
incompatibility between 3.x and 2.x.

> This use-case is already satisfied though - if an application wants
> to see if the function is the same, then the application can compare
> the im_func attribute of the method objects.

But your use case is already satisfied as well - you just have to use the
(class, method) tuple for comparison. In other words, both use cases can be
satisfied by circumventing, if needed, the default __eq__ behaviour. If there's
no overwhelming reason to change the current default, keeping 2.x and 3.0
compatibility should prevail.

Regards

Antoine.

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3500>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to