Author: Manuel Jacob <m...@manueljacob.de>
Branch: py3.5
Changeset: r92169:995cc5bdbad5
Date: 2017-07-22 03:36 +0200
http://bitbucket.org/pypy/pypy/changeset/995cc5bdbad5/

Log:    Rename bytes.translate's 'deletechars' argument to 'delete' to match
        CPython.

diff --git a/pypy/objspace/std/bytesobject.py b/pypy/objspace/std/bytesobject.py
--- a/pypy/objspace/std/bytesobject.py
+++ b/pypy/objspace/std/bytesobject.py
@@ -365,8 +365,8 @@
         characters, all remaining cased characters have lowercase.
         """
 
-    @unwrap_spec(w_deletechars=WrappedDefault(''))
-    def descr_translate(self, space, w_table, w_deletechars):
+    @unwrap_spec(w_delete=WrappedDefault(''))
+    def descr_translate(self, space, w_table, w_delete):
         """B.translate(table[, deletechars]) -> copy of B
 
         Return a copy of the string B, where all characters occurring
diff --git a/pypy/objspace/std/stringmethods.py 
b/pypy/objspace/std/stringmethods.py
--- a/pypy/objspace/std/stringmethods.py
+++ b/pypy/objspace/std/stringmethods.py
@@ -742,8 +742,8 @@
     DEFAULT_NOOP_TABLE = ''.join([chr(i) for i in range(256)])
 
     # for bytes and bytearray, overridden by unicode
-    @unwrap_spec(w_deletechars=WrappedDefault(''))
-    def descr_translate(self, space, w_table, w_deletechars):
+    @unwrap_spec(w_delete=WrappedDefault(''))
+    def descr_translate(self, space, w_table, w_delete):
         if space.is_w(w_table, space.w_None):
             table = self.DEFAULT_NOOP_TABLE
         else:
@@ -753,7 +753,7 @@
                             "translation table must be 256 characters long")
 
         string = self._val(space)
-        deletechars = self._op_val(space, w_deletechars)
+        deletechars = self._op_val(space, w_delete)
         if len(deletechars) == 0:
             buf = self._builder(len(string))
             for char in string:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to