[pypy-svn] r9392 - pypy/dist/pypy/objspace/std
pedronis at codespeak.net
pedronis at codespeak.net
Mon Feb 21 23:03:14 CET 2005
Author: pedronis
Date: Mon Feb 21 23:03:14 2005
New Revision: 9392
Modified:
pypy/dist/pypy/objspace/std/floatobject.py
pypy/dist/pypy/objspace/std/listobject.py
pypy/dist/pypy/objspace/std/tupleobject.py
Log:
removed the last overkill usages of importall
Modified: pypy/dist/pypy/objspace/std/floatobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/floatobject.py (original)
+++ pypy/dist/pypy/objspace/std/floatobject.py Mon Feb 21 23:03:14 2005
@@ -63,6 +63,7 @@
return r
else:
return r + '.0'
+repr__Float = gateway.app2interp(app_repr__Float)
def app_str__Float(f):
r = "%.12g"%f
@@ -71,6 +72,7 @@
return r
else:
return r + '.0'
+str__Float = gateway.app2interp(app_str__Float)
def lt__Float_Float(space, w_float1, w_float2):
i = w_float1.floatval
@@ -274,5 +276,4 @@
StdObjSpace.coerce.register(float_coerce, W_FloatObject)
"""
-gateway.importall(globals())
register_all(vars())
Modified: pypy/dist/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listobject.py (original)
+++ pypy/dist/pypy/objspace/std/listobject.py Mon Feb 21 23:03:14 2005
@@ -291,6 +291,7 @@
del currently_in_repr[list_id]
except:
pass
+listrepr = gateway.app2interp(app_listrepr)
def repr__List(space, w_list):
if w_list.ob_size == 0:
@@ -613,7 +614,5 @@
};
"""
-from pypy.interpreter import gateway
-gateway.importall(globals())
from pypy.objspace.std import listtype
register_all(vars(), listtype)
Modified: pypy/dist/pypy/objspace/std/tupleobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/tupleobject.py (original)
+++ pypy/dist/pypy/objspace/std/tupleobject.py Mon Feb 21 23:03:14 2005
@@ -2,7 +2,7 @@
from pypy.objspace.std.intobject import W_IntObject
from pypy.objspace.std.sliceobject import W_SliceObject
from pypy.objspace.std import slicetype
-
+from pypy.interpreter import gateway
class W_TupleObject(W_Object):
from pypy.objspace.std.tupletype import tuple_typedef as typedef
@@ -117,10 +117,10 @@
else:
return "(" + ", ".join([repr(x) for x in t]) + ')'
+repr__Tuple = gateway.app2interp(app_repr__Tuple)
+
def hash__Tuple(space, w_tuple):
# silly-ish, but _correct_, while lacking it would be WRONG
return space.len(w_tuple)
-from pypy.interpreter import gateway
-gateway.importall(globals())
register_all(vars())
More information about the Pypy-commit
mailing list