[pypy-svn] r13320 - pypy/dist/pypy/rpython
arigo at codespeak.net
arigo at codespeak.net
Sun Jun 12 14:28:52 CEST 2005
Author: arigo
Date: Sun Jun 12 14:28:51 2005
New Revision: 13320
Modified:
pypy/dist/pypy/rpython/lltype.py
Log:
Cannot hash ForwardReferences.
Modified: pypy/dist/pypy/rpython/lltype.py
==============================================================================
--- pypy/dist/pypy/rpython/lltype.py (original)
+++ pypy/dist/pypy/rpython/lltype.py Sun Jun 12 14:28:51 2005
@@ -222,6 +222,9 @@
self.__class__ = realcontainertype.__class__
self.__dict__ = realcontainertype.__dict__
+ def __hash__(self):
+ raise TypeError("%r object is not hashable" % self.__class__.__name__)
+
class GcForwardReference(ForwardReference):
def become(self, realcontainertype):
if not isinstance(realcontainertype, GC_CONTAINER):
More information about the Pypy-commit
mailing list