[pypy-svn] rev 1475 - pypy/trunk/src/pypy/objspace/flow
arigo at codespeak.net
arigo at codespeak.net
Tue Sep 30 17:45:48 CEST 2003
Author: arigo
Date: Tue Sep 30 17:45:47 2003
New Revision: 1475
Modified:
pypy/trunk/src/pypy/objspace/flow/objspace.py
Log:
3rd test passes
Modified: pypy/trunk/src/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/flow/objspace.py Tue Sep 30 17:45:47 2003
@@ -105,7 +105,8 @@
op = getattr(operator, name, None)
if not op:
- return # Can't do it
+ if name == 'call':
+ op = apply
def generic_operator(self, *args_w):
assert len(args_w) == arity, name+" got the wrong number of arguments"
@@ -118,14 +119,15 @@
else:
args.append(arg)
else:
- # All arguments are constants: call the operator now
- #print >> sys.stderr, 'Constant operation:', op, args
- try:
- result = op(*args)
- except:
- self.reraise()
- else:
- return self.wrap(result)
+ if op:
+ # All arguments are constants: call the operator now
+ #print >> sys.stderr, 'Constant operation:', op, args
+ try:
+ result = op(*args)
+ except:
+ self.reraise()
+ else:
+ return self.wrap(result)
spaceop = SpaceOperation(name, args_w, W_Variable())
self.executioncontext.crnt_ops.append(spaceop)
More information about the Pypy-commit
mailing list