[pypy-svn] r10033 - in pypy/dist/pypy: documentation/revreport interpreter module/sys2 objspace
arigo at codespeak.net
arigo at codespeak.net
Mon Mar 21 23:42:42 CET 2005
Author: arigo
Date: Mon Mar 21 23:42:42 2005
New Revision: 10033
Modified:
pypy/dist/pypy/documentation/revreport/delta.py
pypy/dist/pypy/interpreter/py.py
pypy/dist/pypy/module/sys2/__init__.py
pypy/dist/pypy/objspace/trace.py
Log:
Use repr(space) instead of space.__class__.__name__, to give the space a
chance to provide more information (e.g. in the thunk objspace).
Modified: pypy/dist/pypy/documentation/revreport/delta.py
==============================================================================
--- pypy/dist/pypy/documentation/revreport/delta.py (original)
+++ pypy/dist/pypy/documentation/revreport/delta.py Mon Mar 21 23:42:42 2005
@@ -160,7 +160,7 @@
class ObjSpaceExplore(Explore):
def __init__(self, space):
- Explore.__init__(self, "PyPy/%s" % space.__class__.__name__)
+ Explore.__init__(self, "PyPy/%s" % repr(space))
self.space = space
def get_module(self, name):
Modified: pypy/dist/pypy/interpreter/py.py
==============================================================================
--- pypy/dist/pypy/interpreter/py.py (original)
+++ pypy/dist/pypy/interpreter/py.py Mon Mar 21 23:42:42 2005
@@ -86,7 +86,7 @@
con = interactive.PyPyConsole(space, verbose=Options.verbose, completer=Options.completer)
if banner == '':
banner = '%s / %s'%(con.__class__.__name__,
- space.__class__.__name__)
+ repr(space))
con.interact(banner)
except:
exc_type, value, tb = sys.exc_info()
Modified: pypy/dist/pypy/module/sys2/__init__.py
==============================================================================
--- pypy/dist/pypy/module/sys2/__init__.py (original)
+++ pypy/dist/pypy/module/sys2/__init__.py Mon Mar 21 23:42:42 2005
@@ -9,8 +9,6 @@
self.recursionlimit = 100
interpleveldefs = {
- 'pypy_objspaceclass' : '(space.wrap(space.__class__.__name__))',
-
'__name__' : '(space.wrap("sys"))',
'__doc__' : '(space.wrap("PyPy sys module"))',
@@ -26,7 +24,7 @@
'stdout' : 'space.wrap(sys.stdout)',
'__stdout__' : 'space.wrap(sys.stdout)',
'stderr' : 'space.wrap(sys.stderr)',
- 'pypy_objspaceclass' : 'space.wrap(space.__class__.__name__)',
+ 'pypy_objspaceclass' : 'space.wrap(repr(space))',
'path' : 'state.get(space).w_path',
'modules' : 'state.get(space).w_modules',
Modified: pypy/dist/pypy/objspace/trace.py
==============================================================================
--- pypy/dist/pypy/objspace/trace.py (original)
+++ pypy/dist/pypy/objspace/trace.py Mon Mar 21 23:42:42 2005
@@ -217,7 +217,7 @@
if hasattr(self, "_result"):
del self._result
- trace_clz = type("Trace" + space.__class__.__name__, (Trace,), {})
+ trace_clz = type("Trace%s" % repr(space), (Trace,), {})
space.__oldclass__, space.__class__ = space.__class__, trace_clz
space.settrace()
More information about the Pypy-commit
mailing list