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/2005-November/057930.html below:

[Python-Dev] For Python 3k, drop default/implicit hash, and comparison

[Python-Dev] For Python 3k, drop default/implicit hash, and comparisonGuido van Rossum guido at python.org
Sun Nov 6 22:29:27 CET 2005
On 11/6/05, Phillip J. Eby <pje at telecommunity.com> wrote:
> At 12:58 PM 11/6/2005 -0800, Guido van Rossum wrote:
> >The main way this breaks down is when comparing objects of different
> >types. While most comparisons typically are defined in terms of
> >comparisons on simpler or contained objects, two objects of different
> >types that happen to have the same "key" shouldn't necessarily be
> >considered equal.
>
> When I use this pattern, I often just include the object's type in the
> key.  (I call it the 'hashcmp' value, but otherwise it's the same pattern.)

But how do you make that work with subclassing? (I'm guessing your
answer is that you don't. :-)

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
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