[pypy-svn] r57769 - pypy/dist/pypy/objspace
arigo at codespeak.net
arigo at codespeak.net
Tue Sep 2 19:50:39 CEST 2008
Author: arigo
Date: Tue Sep 2 19:50:35 2008
New Revision: 57769
Modified:
pypy/dist/pypy/objspace/descroperation.py
Log:
A small XXX.
Modified: pypy/dist/pypy/objspace/descroperation.py
==============================================================================
--- pypy/dist/pypy/objspace/descroperation.py (original)
+++ pypy/dist/pypy/objspace/descroperation.py Tue Sep 2 19:50:35 2008
@@ -290,6 +290,8 @@
raise OperationError(space.w_TypeError,
space.wrap("unhashable type"))
return default_identity_hash(space, w_obj)
+ # XXX CPython has a special case for types with "__hash__ = None"
+ # to produce a nicer error message, namely "unhashable type: 'X'".
w_result = space.get_and_call_function(w_hash, w_obj)
if space.is_true(space.isinstance(w_result, space.w_int)):
return w_result
More information about the Pypy-commit
mailing list