[pypy-svn] r52051 - pypy/branch/jit-refactoring/pypy/jit/timeshifter
arigo at codespeak.net
arigo at codespeak.net
Sun Mar 2 17:50:29 CET 2008
Author: arigo
Date: Sun Mar 2 17:50:27 2008
New Revision: 52051
Modified:
pypy/branch/jit-refactoring/pypy/jit/timeshifter/greenkey.py
Log:
RPythonification (the easy first step)
Modified: pypy/branch/jit-refactoring/pypy/jit/timeshifter/greenkey.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/timeshifter/greenkey.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/timeshifter/greenkey.py Sun Mar 2 17:50:27 2008
@@ -69,6 +69,9 @@
raise TypeError("don't store GreenKeys in a normal dict")
def __hash__(self):
+ if len(self.values) == 0:
+ # to support using the empty_key as an annotation-time constant
+ return 7623876
raise TypeError("not hashable")
def greenkey_eq(self, other):
More information about the pypy-svn
mailing list