Author: Armin Rigo <[email protected]>
Branch: gc-del
Changeset: r63689:b8bac9d240e7
Date: 2013-04-27 13:38 +0200
http://bitbucket.org/pypy/pypy/changeset/b8bac9d240e7/
Log: Remove the "import x" from the same file x...
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -559,8 +559,6 @@
def _create_new_type(space, w_typetype, w_name, w_bases, w_dict):
# this is in its own function because we want the special case 'type(x)'
# above to be seen by the jit.
- from pypy.objspace.std.typeobject import W_TypeObject
-
if w_bases is None or w_dict is None:
raise OperationError(space.w_TypeError, space.wrap("type() takes 1 or
3 arguments"))
@@ -602,7 +600,6 @@
return w_type
def _precheck_for_new(space, w_type):
- from pypy.objspace.std.typeobject import W_TypeObject
if not isinstance(w_type, W_TypeObject):
raise operationerrfmt(space.w_TypeError,
"X is not a type object (%s)",
@@ -612,7 +609,6 @@
# ____________________________________________________________
def _check(space, w_type, w_msg=None):
- from pypy.objspace.std.typeobject import W_TypeObject
if not isinstance(w_type, W_TypeObject):
if w_msg is None:
w_msg = space.wrap("descriptor is for 'type'")
@@ -645,7 +641,6 @@
return space.newtuple(w_type.bases_w)
def mro_subclasses(space, w_type, temp):
- from pypy.objspace.std.typeobject import W_TypeObject, compute_mro
temp.append((w_type, w_type.mro_w))
compute_mro(w_type)
for w_sc in w_type.get_subclasses():
@@ -654,9 +649,6 @@
def descr_set__bases__(space, w_type, w_value):
# this assumes all app-level type objects are W_TypeObject
- from pypy.objspace.std.typeobject import (W_TypeObject, get_parent_layout,
- check_and_find_best_base, is_mro_purely_of_types)
-
w_type = _check(space, w_type)
if not w_type.is_heaptype():
raise operationerrfmt(space.w_TypeError,
@@ -723,7 +715,6 @@
assert w_type.w_same_layout_as is get_parent_layout(w_type) # invariant
def descr__base(space, w_type):
- from pypy.objspace.std.typeobject import find_best_base
w_type = _check(space, w_type)
return find_best_base(space, w_type.bases_w)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit