hashval and Numpy

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Fri Oct 19 10:08:50 EDT 2001


Wed, 17 Oct 2001 14:07:41 GMT, Michael Hudson <mwh at python.net> pisze:

> Moral: don't use mutable objects as dictionary keys.

Unless mutations don't affect the hash value, and equal objects have
equal hashes (it follows that mutations must not affect equality).
Objects can be mutable as long as they are compared and hashed using
their immutable parts.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list