Possibly dumb question about dicts and __hash__()

Joel Hedlund joel.hedlund at gmail.com
Wed May 3 22:59:45 CEST 2006


But how come my attempt didn't work? I've seen docs that explain how __hash__() 
methods are used to put objects in dict buckets:


But if it's really hash(str(o)) that's used for dict keys, what good are 
__hash__() methods? Or am I reading the docs wrong?


More information about the Python-list mailing list