[Tutor] hash()ing a list

Orri Ganel singingxduck at gmail.com
Sun Mar 27 19:21:34 CEST 2005


Hello all,

While I do not have a pressing need to hash a list, I am curious as to
why, if lists are unhashable, there is a __hash__() method in the list
class, which also does not work on lists, but results in a 'TypeError:
list objects are unhashable'.  What's the point of including a
__hash__() method in the list class if lists are unhashable?

Thanks in advance,
Orri

-- 
Email: singingxduck AT gmail DOT com
AIM: singingxduck
Programming Python for the fun of it.


More information about the Tutor mailing list