change of random state when pyc created??

Robert Kern robert.kern at gmail.com
Thu May 10 00:10:19 EDT 2007


Steven D'Aprano wrote:
> On Wed, 09 May 2007 21:18:25 -0500, Robert Kern wrote:
> 
>> Actually, the root cause of Peter's specific example is the fact that the
>> default implementation of __hash__() and __eq__() rely on identity comparisons.
>> Two separate invocations of the same script give different objects by identity
>> and thus the "history of insertions and deletions" is different.
> 
> The history is the same. The objects inserted are the same (by equality).

No, they *were* different by equality (identity being the default implementation
equality that was not overridden in either Peter's code nor Alan's).

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Python-list mailing list