[Python-bugs-list] [ python-Bugs-800796 ] Difference between hash() and __hash__()

SourceForge.net noreply at sourceforge.net
Thu Sep 4 17:46:29 EDT 2003


Bugs item #800796, was opened at 2003-09-04 23:46
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=800796&group_id=5470

Category: None
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Stefan Fleiter (fleiter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Difference between hash() and __hash__()

Initial Comment:


Raymond told me in comp.lang.python to submit

this bug, he is working on a fix.



>>> s = slice(None,5)

>>> s.__hash__()

136748064

>>> hash(s)

Traceback (most recent call last):

  File "<stdin>", line 1, in ?

TypeError: unhashable type



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=800796&group_id=5470



More information about the Python-bugs-list mailing list