
Jan. 27, 2001
5:43 p.m.
"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