Author: Philip Jenvey <[email protected]>
Branch:
Changeset: r63780:3b9de8a7eec4
Date: 2013-04-30 17:43 -0700
http://bitbucket.org/pypy/pypy/changeset/3b9de8a7eec4/
Log: cleanup imports
diff --git a/pypy/objspace/std/bytearrayobject.py
b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -1,30 +1,23 @@
+"""The builtin bytearray implementation"""
+
+from pypy.interpreter.buffer import RWBuffer
from pypy.interpreter.error import OperationError, operationerrfmt
-from pypy.objspace.std.model import registerimplementation, W_Object
-from pypy.objspace.std.register_all import register_all
+from pypy.interpreter.signature import Signature
+from pypy.objspace.std import stringobject
+from pypy.objspace.std.bytearraytype import (
+ getbytevalue, makebytearraydata_w, new_bytearray)
+from pypy.objspace.std.intobject import W_IntObject
from pypy.objspace.std.inttype import wrapint
+from pypy.objspace.std.listobject import get_list_index, get_positive_index
+from pypy.objspace.std.model import W_Object, registerimplementation
from pypy.objspace.std.multimethod import FailedToImplement
from pypy.objspace.std.noneobject import W_NoneObject
-from rpython.rlib.rarithmetic import intmask
-from rpython.rlib.rstring import StringBuilder
-from rpython.rlib.debug import check_annotation
-from pypy.objspace.std import stringobject
-from pypy.objspace.std.intobject import W_IntObject
-from pypy.objspace.std.listobject import get_positive_index, get_list_index
+from pypy.objspace.std.register_all import register_all
from pypy.objspace.std.sliceobject import W_SliceObject, normalize_simple_slice
from pypy.objspace.std.stringobject import W_StringObject
-from pypy.objspace.std.strutil import ParseStringError
-from pypy.objspace.std.strutil import string_to_float
from pypy.objspace.std.tupleobject import W_TupleObject
from pypy.objspace.std.unicodeobject import W_UnicodeObject
-from pypy.objspace.std import slicetype
-from pypy.interpreter import gateway
-from pypy.interpreter.buffer import RWBuffer
-from pypy.interpreter.signature import Signature
-from pypy.objspace.std.bytearraytype import (
- makebytearraydata_w, getbytevalue,
- new_bytearray
-)
-from rpython.tool.sourcetools import func_with_new_name
+from rpython.rlib.rstring import StringBuilder
class W_BytearrayObject(W_Object):
diff --git a/pypy/objspace/std/stringobject.py
b/pypy/objspace/std/stringobject.py
--- a/pypy/objspace/std/stringobject.py
+++ b/pypy/objspace/std/stringobject.py
@@ -1,25 +1,24 @@
-from pypy.objspace.std.model import registerimplementation, W_Object
+"""The builtin str implementation"""
+
+from pypy.interpreter.buffer import StringBuffer
+from pypy.interpreter.error import OperationError, operationerrfmt
+from pypy.objspace.std import newformat, slicetype
+from pypy.objspace.std.formatting import mod_format
+from pypy.objspace.std.inttype import wrapint
+from pypy.objspace.std.model import W_Object, registerimplementation
+from pypy.objspace.std.multimethod import FailedToImplement
+from pypy.objspace.std.noneobject import W_NoneObject
from pypy.objspace.std.register_all import register_all
-from pypy.objspace.std.multimethod import FailedToImplement
-from pypy.interpreter.error import OperationError, operationerrfmt
-from pypy.interpreter import gateway
+from pypy.objspace.std.sliceobject import W_SliceObject, normalize_simple_slice
+from pypy.objspace.std.stringtype import (
+ joined2, sliced, stringendswith, stringstartswith, wrapchar, wrapstr)
+from pypy.objspace.std.tupleobject import W_TupleObject
+from rpython.rlib import jit
+from rpython.rlib.objectmodel import (
+ compute_hash, compute_unique_id, specialize)
from rpython.rlib.rarithmetic import ovfcheck
-from rpython.rlib.objectmodel import we_are_translated, compute_hash,
specialize
-from rpython.rlib.objectmodel import compute_unique_id
-from pypy.objspace.std.inttype import wrapint
-from pypy.objspace.std.sliceobject import W_SliceObject, normalize_simple_slice
-from pypy.objspace.std import slicetype, newformat
-from pypy.objspace.std.listobject import W_ListObject
-from pypy.objspace.std.noneobject import W_NoneObject
-from pypy.objspace.std.tupleobject import W_TupleObject
from rpython.rlib.rstring import StringBuilder, split
-from pypy.interpreter.buffer import StringBuffer
-from rpython.rlib import jit
-from pypy.objspace.std.stringtype import sliced, wrapstr, wrapchar, \
- stringendswith, stringstartswith, joined2
-
-from pypy.objspace.std.formatting import mod_format
class W_AbstractStringObject(W_Object):
__slots__ = ()
diff --git a/pypy/objspace/std/unicodeobject.py
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -1,24 +1,26 @@
-from pypy.objspace.std.model import registerimplementation, W_Object
-from pypy.objspace.std.register_all import register_all
+"""The builtin unicode implementation"""
+
+from pypy.interpreter.error import OperationError, operationerrfmt
+from pypy.module.unicodedata import unicodedb
+from pypy.objspace.std import newformat, slicetype
+from pypy.objspace.std.formatting import mod_format
+from pypy.objspace.std.model import W_Object, registerimplementation
from pypy.objspace.std.multimethod import FailedToImplement
-from pypy.interpreter import gateway
-from pypy.interpreter.error import OperationError, operationerrfmt
-from pypy.objspace.std.stringobject import W_StringObject,
make_rsplit_with_delim
from pypy.objspace.std.noneobject import W_NoneObject
from pypy.objspace.std.sliceobject import W_SliceObject, normalize_simple_slice
-from pypy.objspace.std import slicetype, newformat
+from pypy.objspace.std.stringobject import (
+ W_StringObject, make_rsplit_with_delim)
+from pypy.objspace.std.stringtype import stringendswith, stringstartswith
+from pypy.objspace.std.register_all import register_all
from pypy.objspace.std.tupleobject import W_TupleObject
-from rpython.rlib.rarithmetic import intmask, ovfcheck
-from rpython.rlib.objectmodel import compute_hash, specialize
-from rpython.rlib.objectmodel import compute_unique_id
+from rpython.rlib import jit
+from rpython.rlib.rarithmetic import ovfcheck
+from rpython.rlib.objectmodel import (
+ compute_hash, compute_unique_id, specialize)
from rpython.rlib.rstring import UnicodeBuilder
from rpython.rlib.runicode import make_unicode_escape_function
-from pypy.module.unicodedata import unicodedb
from rpython.tool.sourcetools import func_with_new_name
-from rpython.rlib import jit
-from pypy.objspace.std.formatting import mod_format
-from pypy.objspace.std.stringtype import stringstartswith, stringendswith
class W_AbstractUnicodeObject(W_Object):
__slots__ = ()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit