Different Random Numbers Between Already/Not Yet Compiled Code
Michael Hudson
mwh at python.net
Fri Jan 25 11:32:52 EST 2002
Eric Eide <eeide at cs.utah.edu> writes:
> "Tim" == Tim Peters <tim.one at home.com> writes:
>
> 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__}
>
> Well, it let me, AFAIK. See the code below, which uses instances of
> `Product' as dictionary keys.
I think you've misread what Tim wrote.
Cheers,
M.
--
A.D. 1517: Martin Luther nails his 95 Theses to the church door and
is promptly moderated down to (-1, Flamebait).
-- http://slashdot.org/comments.pl?sid=01/02/09/1815221&cid=52
(although I've seen it before)
More information about the Python-list
mailing list