¡@

Home 

python Programming Glossary: hash_test

When is a python object's hash computed and why is the hash of -1 different?

http://stackoverflow.com/questions/7648129/when-is-a-python-objects-hash-computed-and-why-is-the-hash-of-1-different

__hash__ self print 'Yes __hash__ was called ' return 1 hash_test HashTest # All of these will print out 'Yes __hash__ was called.. out 'Yes __hash__ was called ' print '__hash__ call #1' hash_test.__hash__ print '__hash__ call #2' hash_test.__hash__ print 'hash.. call #1' hash_test.__hash__ print '__hash__ call #2' hash_test.__hash__ print 'hash call #1' hash hash_test print 'hash call..