[pypy-commit] pypy py3k: Remove bytes.__mod__ and bytes.format

amauryfa noreply at buildbot.pypy.org
Tue Oct 18 00:37:57 CEST 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48166:e6e61c35b8f3
Date: 2011-10-17 21:30 +0200
http://bitbucket.org/pypy/pypy/changeset/e6e61c35b8f3/

Log:	Remove bytes.__mod__ and bytes.format

diff --git a/pypy/objspace/std/ropeobject.py b/pypy/objspace/std/ropeobject.py
--- a/pypy/objspace/std/ropeobject.py
+++ b/pypy/objspace/std/ropeobject.py
@@ -15,8 +15,6 @@
 
 from pypy.rlib import rope
 from pypy.objspace.std.stringobject import (
-    mod__String_ANY as mod__Rope_ANY,
-    str_format__String as str_format__Rope,
     _upper, _lower, DEFAULT_NOOP_TABLE)
 
 class W_RopeObject(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
@@ -17,8 +17,6 @@
 from pypy.objspace.std.stringtype import sliced, wrapstr, wrapchar, \
      stringendswith, stringstartswith, joined2
 
-from pypy.objspace.std.formatting import mod_format
-
 class W_StringObject(W_Object):
     from pypy.objspace.std.stringtype import str_typedef as typedef
     _immutable_fields_ = ['_value']
@@ -996,15 +994,6 @@
     encoding, errors = _get_encoding_and_errors(space, w_encoding, w_errors)
     return decode_object(space, w_string, encoding, errors)
 
-# CPython's logic for deciding if  ""%values  is
-# an error (1 value, 0 %-formatters) or not
-# (values is of a mapping type)
-def mod__String_ANY(space, w_format, w_values):
-    return mod_format(space, w_format, w_values, do_unicode=False)
-
-def str_format__String(space, w_string, __args__):
-    return newformat.format_method(space, w_string, __args__, False)
-
 def format__String_ANY(space, w_string, w_format_spec):
     if not space.isinstance_w(w_format_spec, space.w_str):
         w_format_spec = space.str(w_format_spec)
diff --git a/pypy/objspace/std/stringtype.py b/pypy/objspace/std/stringtype.py
--- a/pypy/objspace/std/stringtype.py
+++ b/pypy/objspace/std/stringtype.py
@@ -85,7 +85,6 @@
                       ' maxsplit is given, at most maxsplit splits are\ndone.'
                       ' If sep is not specified or is None, any whitespace'
                       ' string\nis a separator.')
-str_format     = SMM('format', 1, general__args__=True)
 str_isdigit    = SMM('isdigit', 1,
                      doc='S.isdigit() -> bool\n\nReturn True if all characters'
                          ' in S are digits\nand there is at least one'


More information about the pypy-commit mailing list