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

I would add that making the comparison "right" for partial would be
trickier than it seems:

>>> from functools import partial
>>> type == type
True
>>> 1 == 1.0
True
>>> partial(type, 1)() == partial(type, 1.0)()
False

If partial(type, 1) and partial(type, 1.0) were to compare equal, it
would break the expectation, stated by Matt, that two equal function
objects produce the same results when given the same inputs.


PS: 
>>> partial(type, 1)()
<type 'int'>
>>> partial(type, 1.0)()
<type 'float'>

----------
nosy: +pitrou

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

Reply via email to