A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20100516/c8fd32eb/attachment.html below:

<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">&gt; So I&#39;m thinking either we make an<br>
&gt; immutable/hashable dict while we&#39;re at it, or store the keyword<br>
&gt; arguments as a tuple (which guarantees immutability), and only<br>
&gt; convert them back to a dict when you want to call the partial object<br>
&gt; (simpler, slower).<br>
<br>
</div>I&#39;d support an immutable dict. [...]</blockquote><div><br></div><div>I&#39;ve set out to implement a frozendict (like frozenset) for use to store functools.keywords&#39; attribute, and quickly realized I didn&#39;t think of an obvious flaw in that idea. A frozenset will only accept hashable members, but a frozendict can&#39;t afford this luxury for its values.</div>
<div><br></div><div>I&#39;m not sure how should I go about handling that, if at all. Should I implement a frozendict which will remain unhashable but support equality testing like a regular dict? A frozendict that is only hashable if all its values are hashable, like a tuple? Is the whole notion of a frozendict worthy, given this limitation?</div>
<div><br></div><div>I&#39;d be happy to hear python-dev&#39;s guidance on this.</div><div><br></div><div>Cheers,</div><div> - Yaniv</div></div></div>

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