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/2001-January/012245.html below:

New bug in function object hash() and comparisons

[Python-Dev] Re: New bug in function object hash() and comparisons [Python-Dev] Re: New bug in function object hash() and comparisonsBarry A. Warsaw barry@digicool.com
Sat, 27 Jan 2001 12:43:43 -0500
>>>>> "GvR" == Guido van Rossum <guido@digicool.com> writes:

    GvR> Clearly, something changed.  I'm pretty sure it's the
    GvR> function attributes.

Actually no.  func_code is used in func_hash() but somewhere in the
Python 1.6 cycle, func_code was made assignable.
    
    GvR> Either the function attributes shouldn't be used in comparing
    GvR> function objects, or hash() on functions should be
    GvR> unimplemented, or comparison on functions should use simple
    GvR> pointer compares.

    GvR> What's the right solution?

We should definitely continue to allow functions as keys to
dictionaries, but probably just remove func_code as an input to the
function's hash.
    
-Barry



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