[pypy-svn] r7334 - pypy/trunk/src/pypy/tool
hpk at codespeak.net
hpk at codespeak.net
Wed Nov 17 16:57:38 CET 2004
Author: hpk
Date: Wed Nov 17 16:57:37 2004
New Revision: 7334
Modified:
pypy/trunk/src/pypy/tool/frozendict.py
Log:
make frozendict's naively hashable (using id(x))
Modified: pypy/trunk/src/pypy/tool/frozendict.py
==============================================================================
--- pypy/trunk/src/pypy/tool/frozendict.py (original)
+++ pypy/trunk/src/pypy/tool/frozendict.py Wed Nov 17 16:57:37 2004
@@ -5,3 +5,6 @@
raise TypeError, "this dict is already frozen, you are too late!"
__delitem__ = setdefault = update = pop = popitem = clear = __setitem__
+ def __hash__(self):
+ return id(self)
+
More information about the Pypy-commit
mailing list