[pypy-svn] rev 1046 - pypy/trunk/src/pypy/objspace/std
hpk at codespeak.net
hpk at codespeak.net
Tue Jun 24 14:52:20 CEST 2003
Author: hpk
Date: Tue Jun 24 14:52:19 2003
New Revision: 1046
Modified:
pypy/trunk/src/pypy/objspace/std/boolobject.py
pypy/trunk/src/pypy/objspace/std/cpythonobject.py
pypy/trunk/src/pypy/objspace/std/default.py
pypy/trunk/src/pypy/objspace/std/dictobject.py
pypy/trunk/src/pypy/objspace/std/floatobject.py
pypy/trunk/src/pypy/objspace/std/floattype.py
pypy/trunk/src/pypy/objspace/std/funcobject.py
pypy/trunk/src/pypy/objspace/std/instmethobject.py
pypy/trunk/src/pypy/objspace/std/iterobject.py
pypy/trunk/src/pypy/objspace/std/listobject.py
pypy/trunk/src/pypy/objspace/std/noneobject.py
pypy/trunk/src/pypy/objspace/std/nullobject.py
pypy/trunk/src/pypy/objspace/std/objectobject.py
pypy/trunk/src/pypy/objspace/std/objecttype.py
pypy/trunk/src/pypy/objspace/std/objspace.py
pypy/trunk/src/pypy/objspace/std/register_all.py
pypy/trunk/src/pypy/objspace/std/sliceobject.py
pypy/trunk/src/pypy/objspace/std/stringobject.py
pypy/trunk/src/pypy/objspace/std/stringtype.py
pypy/trunk/src/pypy/objspace/std/tupleobject.py
pypy/trunk/src/pypy/objspace/std/typeobject.py
pypy/trunk/src/pypy/objspace/std/typetype.py
pypy/trunk/src/pypy/objspace/std/userobject.py
pypy/trunk/src/pypy/objspace/std/usertype.py
Log:
moved register_all into objspace so we spare
an import (armin's suggestion).
to avoid circular imports register_all has
the imports now inside instead of at module
global level.
Modified: pypy/trunk/src/pypy/objspace/std/boolobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/boolobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/boolobject.py Tue Jun 24 14:52:19 2003
@@ -7,7 +7,6 @@
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from booltype import W_BoolType
import intobject
Modified: pypy/trunk/src/pypy/objspace/std/cpythonobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/cpythonobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/cpythonobject.py Tue Jun 24 14:52:19 2003
@@ -10,7 +10,6 @@
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from stringobject import W_StringObject
import sys, operator, types
Modified: pypy/trunk/src/pypy/objspace/std/default.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/default.py (original)
+++ pypy/trunk/src/pypy/objspace/std/default.py Tue Jun 24 14:52:19 2003
@@ -1,7 +1,6 @@
"""Default implementation for some operation."""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
# These are operations that must fall back to some default behavior,
Modified: pypy/trunk/src/pypy/objspace/std/dictobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/dictobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/dictobject.py Tue Jun 24 14:52:19 2003
@@ -6,7 +6,6 @@
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from dicttype import W_DictType, _no_object
from stringobject import W_StringObject
from pypy.interpreter.extmodule import make_builtin_func
Modified: pypy/trunk/src/pypy/objspace/std/floatobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/floatobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/floatobject.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from floattype import W_FloatType
##############################################################
Modified: pypy/trunk/src/pypy/objspace/std/floattype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/floattype.py (original)
+++ pypy/trunk/src/pypy/objspace/std/floattype.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from typeobject import W_TypeObject
Modified: pypy/trunk/src/pypy/objspace/std/funcobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/funcobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/funcobject.py Tue Jun 24 14:52:19 2003
@@ -1,6 +1,5 @@
from __future__ import nested_scopes
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from functype import W_FuncType
import pypy.interpreter.pyframe
from pypy.objspace.std.instmethobject import W_InstMethObject
Modified: pypy/trunk/src/pypy/objspace/std/instmethobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/instmethobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/instmethobject.py Tue Jun 24 14:52:19 2003
@@ -15,7 +15,6 @@
from __future__ import nested_scopes
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from instmethtype import W_InstMethType
Modified: pypy/trunk/src/pypy/objspace/std/iterobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/iterobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/iterobject.py Tue Jun 24 14:52:19 2003
@@ -5,7 +5,6 @@
for function-iteration.
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from itertype import W_SeqIterType
Modified: pypy/trunk/src/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/listobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/listobject.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from listtype import W_ListType
from intobject import W_IntObject
from sliceobject import W_SliceObject
Modified: pypy/trunk/src/pypy/objspace/std/noneobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/noneobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/noneobject.py Tue Jun 24 14:52:19 2003
@@ -5,7 +5,6 @@
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from nonetype import W_NoneType
class W_NoneObject(W_Object):
Modified: pypy/trunk/src/pypy/objspace/std/nullobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/nullobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/nullobject.py Tue Jun 24 14:52:19 2003
@@ -5,7 +5,6 @@
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from nulltype import W_NullType
class W_NullObject(W_Object):
Modified: pypy/trunk/src/pypy/objspace/std/objectobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objectobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/objectobject.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
class W_ObjectObject(W_Object):
Modified: pypy/trunk/src/pypy/objspace/std/objecttype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objecttype.py (original)
+++ pypy/trunk/src/pypy/objspace/std/objecttype.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from typeobject import W_TypeObject
Modified: pypy/trunk/src/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/std/objspace.py Tue Jun 24 14:52:19 2003
@@ -5,6 +5,7 @@
"""
import pypy.interpreter.appfile
+from register_all import register_all
from pypy.interpreter.baseobjspace import *
from multimethod import *
Modified: pypy/trunk/src/pypy/objspace/std/register_all.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/register_all.py (original)
+++ pypy/trunk/src/pypy/objspace/std/register_all.py Tue Jun 24 14:52:19 2003
@@ -1,4 +1,3 @@
-from pypy.objspace.std.objspace import StdObjSpace, W_ANY
_name_mappings = {
'and': 'and_',
@@ -14,6 +13,7 @@
If the name doesn't exist then the alternative namespace is tried
for registration.
"""
+ from pypy.objspace.std.objspace import StdObjSpace, W_ANY
for name, obj in module_dict.items():
if name.find('__')<1:
@@ -63,6 +63,7 @@
check if it already has ne, ge and le respectively.
If not, then add them as space.not_ on the implemented methods.
"""
+ from pypy.objspace.std.objspace import StdObjSpace, W_ANY
for method, mirror in operators:
try:
Modified: pypy/trunk/src/pypy/objspace/std/sliceobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/sliceobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/sliceobject.py Tue Jun 24 14:52:19 2003
@@ -6,7 +6,6 @@
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from pypy.interpreter.appfile import AppFile
from pypy.interpreter.extmodule import make_builtin_func
from pypy.objspace.std.instmethobject import W_InstMethObject
Modified: pypy/trunk/src/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/stringobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/stringobject.py Tue Jun 24 14:52:19 2003
@@ -72,7 +72,6 @@
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from stringtype import W_StringType
from intobject import W_IntObject
from sliceobject import W_SliceObject
Modified: pypy/trunk/src/pypy/objspace/std/stringtype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/stringtype.py (original)
+++ pypy/trunk/src/pypy/objspace/std/stringtype.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from typeobject import W_TypeObject
Modified: pypy/trunk/src/pypy/objspace/std/tupleobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/tupleobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/tupleobject.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from tupletype import W_TupleType
from intobject import W_IntObject
from sliceobject import W_SliceObject
Modified: pypy/trunk/src/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/typeobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/typeobject.py Tue Jun 24 14:52:19 2003
@@ -1,5 +1,4 @@
from pypy.interpreter import pycode
-from pypy.objspace.std.register_all import register_all
from pypy.objspace.std.objspace import *
Modified: pypy/trunk/src/pypy/objspace/std/typetype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/typetype.py (original)
+++ pypy/trunk/src/pypy/objspace/std/typetype.py Tue Jun 24 14:52:19 2003
@@ -1,6 +1,5 @@
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
-from typeobject import W_TypeObject
+from typeobject import W_TypeObject # , NewMultimethodCode
class W_TypeType(W_TypeObject):
"""The single instance of this class is the object the user sees as
Modified: pypy/trunk/src/pypy/objspace/std/userobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/userobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/userobject.py Tue Jun 24 14:52:19 2003
@@ -7,7 +7,6 @@
as well as of normal and special attributes.
"""
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
from usertype import W_UserType
import typeobject
Modified: pypy/trunk/src/pypy/objspace/std/usertype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/usertype.py (original)
+++ pypy/trunk/src/pypy/objspace/std/usertype.py Tue Jun 24 14:52:19 2003
@@ -3,7 +3,6 @@
"""
from __future__ import nested_scopes
from pypy.objspace.std.objspace import *
-from pypy.objspace.std.register_all import register_all
import typeobject, objecttype
from typeobject import W_TypeObject
More information about the Pypy-commit
mailing list