Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 70947:60b3a5615c4e 2.7
Issue #12164: Document (in docstring) that str.translate accepts None for the first argument.
| author | Mark Dickinson <mdickinson@enthought.com> |
|---|---|
| date | Sat, 25 Jun 2011 11:00:12 +0200 |
| parents | 3ceeccbc2c3b |
| children | e266415cf42c |
line wrap: on
line diff
--- a/Objects/stringobject.c Sat Jun 25 09:55:10 2011 +0200 +++ b/Objects/stringobject.c Sat Jun 25 11:00:12 2011 +0200 @@ -2173,7 +2173,9 @@ Return a copy of the string S, where all characters occurring\n\ in the optional argument deletechars are removed, and the\n\ remaining characters have been mapped through the given\n\ -translation table, which must be a string of length 256."); +translation table, which must be a string of length 256 or None.\n\ +If the table argument is None, no translation is applied and\n\ +the operation simply removes the characters in deletechars."); static PyObject * string_translate(PyStringObject *self, PyObject *args)
