A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-May/100108.html below:

Possible patch for functools partial...)

[Python-Dev] frozendict (was: Possible patch for functools partial...) [Python-Dev] frozendict (was: Possible patch for functools partial...)Antoine Pitrou solipsis at pitrou.net
Sun May 16 12:53:58 CEST 2010
On Sun, 16 May 2010 11:55:14 +1000
Yaniv Aknin <yaniv at aknin.name> wrote:
> 
> Is the whole notion of a frozendict
> worthy, given this limitation?

I don't think so. Of course we how have a more general problem:
- if we choose to implement only equality testing for partials and
  leave hashing as is, then hashing isn't consistent with equality
  anymore -- which is unacceptable
- if we choose to implement only equality testing for partials and make
  them unhashable, we are breaking programs which store partials in a
  set or a dict

So we are left with the following choice:
- implement hashing consistently with equality testing, even though the
  keyword arguments can be changed later. I think this is acceptable
  from a practicality standpoint
- abandon the whole idea of improving equality testing

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4