Re: Fwd: keying by identity in dict and set

2019-10-29 Thread dieter
Steve White writes: > ... > A little documentation would have saved me personally days of work. > It would be helpful to know: > * under what conditions can one expect a "perfect hash", that is, > one where __eq__() will never be called? Never expect it: keys with different hash values may end

Fwd: keying by identity in dict and set

2019-10-26 Thread Steve White
Hi Dieter, I'm sure that 99% of all use of 'dict' in Python is exactly this. The vast majority of my own Python code is such, and that is as it should be. Here I have an application where I can do something really cool and useful, by keying on identity. The built-in Python structures are pretty

Fwd: keying by identity in dict and set

2019-10-20 Thread Steve White
-- Forwarded message - From: Steve White Date: Sun, Oct 20, 2019 at 11:38 PM Subject: Re: keying by identity in dict and set To: Peter Otten <__pete...@web.de> Hi Peter, Thanks, that does seem to indicate something. (But there was no need to define a class... you're basically sa