[pypy-svn] r9106 - pypy/dist/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Fri Feb 11 13:58:36 CET 2005
Author: arigo
Date: Fri Feb 11 13:58:35 2005
New Revision: 9106
Modified:
pypy/dist/pypy/objspace/std/multimethod.py
Log:
Python 2.2 compatibility.
Modified: pypy/dist/pypy/objspace/std/multimethod.py
==============================================================================
--- pypy/dist/pypy/objspace/std/multimethod.py (original)
+++ pypy/dist/pypy/objspace/std/multimethod.py Fri Feb 11 13:58:35 2005
@@ -23,12 +23,9 @@
self.argnames_after = argnames_after
def register(self, function, *types, **kwds):
- try:
- order = kwds.pop('order')
- except KeyError:
- order = 0
- assert not kwds
assert len(types) == self.arity
+ assert kwds.keys() == [] or kwds.keys() == ['order']
+ order = kwds.get('order', 0)
node = self.dispatch_tree
for type in types[:-1]:
node = node.setdefault(type, {})
More information about the Pypy-commit
mailing list