Philip Jenvey  committed ced0ef8

add maketrans' docs

  • Participants
  • Parent commits ffa7cbd
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/objspace/std/

         If chars is a str, it will be converted to unicode before stripping
+    def maketrans():
+        """str.maketrans(x[, y[, z]]) -> dict (static method)
+        Return a translation table usable for str.translate().  If there
+        is only one argument, it must be a dictionary mapping Unicode
+        ordinals (integers) or characters to Unicode ordinals, strings
+        or None.  Character keys will be then converted to ordinals.  If
+        there are two arguments, they must be strings of equal length,
+        and in the resulting dictionary, each character in x will be
+        mapped to the character at the same position in y. If there is a
+        third argument, it must be a string, whose characters will be
+        mapped to None in the result.
+        """
     def partition():
         """S.partition(sep) -> (head, sep, tail)
     __getnewargs__ = interp2app(W_UnicodeObject.descr_getnewargs,
     maketrans = interp2app(W_UnicodeObject.descr_maketrans,
-                           as_classmethod=True),
+                           as_classmethod=True,
+                           doc=UnicodeDocstrings.maketrans.__doc__),