[pypy-svn] rev 2421 - pypy/trunk/src/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Wed Dec 17 12:23:10 CET 2003
Author: arigo
Date: Wed Dec 17 12:23:09 2003
New Revision: 2421
Modified:
pypy/trunk/src/pypy/objspace/std/objspace.py
Log:
Fix (?) multimethod delegation order to make " 0 == 0.0 " work.
Modified: pypy/trunk/src/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/std/objspace.py Wed Dec 17 12:23:09 2003
@@ -20,10 +20,10 @@
MultiMethod.BASE_TYPE_OBJECT = W_AbstractTypeObject
# delegation priorities
-PRIORITY_SAME_TYPE = 2 # converting between several impls of the same type
-PRIORITY_PARENT_TYPE = 1 # converting to a base type (e.g. bool -> int)
+PRIORITY_SAME_TYPE = 3 # converting between several impls of the same type
+PRIORITY_PARENT_TYPE = 2 # converting to a base type (e.g. bool -> int)
+PRIORITY_CHANGE_TYPE = 1 # changing type altogether (e.g. int -> float)
PRIORITY_PARENT_IMPL = 0 # hard-wired in multimethod.py
-PRIORITY_CHANGE_TYPE = -1 # changing type altogether (e.g. int -> float)
def registerimplementation(implcls):
# this function should ultimately register the implementation class somewhere
More information about the Pypy-commit
mailing list