Different Random Numbers Between Already/Not Yet Compiled Code
Eric Eide
eeide at cs.utah.edu
Fri Jan 25 12:54:25 EST 2002
"Tim" == Tim Peters <tim.one at home.com> and
"Eric" == Eric Eide <eeide at cs.utah.edu> and
"Michael" == Michael Hudson <mwh at python.net> write:
Tim> [...] but Python won't *let* you use instances as dict keys unless
Tim> you define both or neither of
Tim>
Tim> 1. __hash__
Tim> 2. One of {__cmp__, __eq__}
Eric> Well, it let me, AFAIK. See the code below, which uses instances
Eric> of `Product' as dictionary keys.
Michael> I think you've misread what Tim wrote.
Oops! I did misread what Tim wrote; I missed ``neither of.'' My apologies!
Eric.
--
-------------------------------------------------------------------------------
Eric Eide <eeide at cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
More information about the Python-list
mailing list