[pypy-svn] r9047 - pypy/dist/pypy/objspace/flow
pedronis at codespeak.net
pedronis at codespeak.net
Thu Feb 10 16:18:38 CET 2005
Author: pedronis
Date: Thu Feb 10 16:18:38 2005
New Revision: 9047
Modified:
pypy/dist/pypy/objspace/flow/objspace.py
Log:
let have control over builtins can raise exceptions
(I'm not sure whether we could simply change the default)
(needed for geninterplevel of _classobj)
Modified: pypy/dist/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/objspace.py (original)
+++ pypy/dist/pypy/objspace/flow/objspace.py Thu Feb 10 16:18:38 2005
@@ -29,6 +29,8 @@
full_exceptions = False
resolve_constants = True # used by the appflowspace
+
+ builtins_can_raise_exceptions = False
def initialize(self):
import __builtin__
@@ -290,7 +292,8 @@
c = w_callable.value
if isinstance(c, (types.BuiltinFunctionType,
types.BuiltinMethodType)):
- exceptions = None
+ if not self.builtins_can_raise_exceptions:
+ exceptions = None
elif (isinstance(c, (type, types.ClassType)) and
c.__module__ in ['__builtin__', 'exceptions']):
exceptions = None
More information about the Pypy-commit
mailing list