[issue8699] Equality and hashing for functools.partial

Daniel Urban report at bugs.python.org
Thu May 13 18:39:50 CEST 2010


Daniel Urban <urban.dani+py at gmail.com> added the comment:

On python-dev Yaniv Aknin pointed out that the keywords dictionary of a partial object is mutable [1].  This causes problems with hashing and equality.  The new patch replaces the keywords dictionary with a read-only proxy of that dictionary.  This seems to solve the problem. 

[1] http://mail.python.org/pipermail/python-dev/2010-May/100059.html

----------
Added file: http://bugs.python.org/file17318/partial_eq_hash_3.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8699>
_______________________________________


More information about the Python-bugs-list mailing list