]> granicus.if.org Git - python/commitdiff
RFE #1592899: mention string.maketrans() in docs for str.translate,
authorGeorg Brandl <georg@python.org>
Thu, 7 Dec 2006 09:30:06 +0000 (09:30 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 7 Dec 2006 09:30:06 +0000 (09:30 +0000)
remove reference to the old regex module in the former's doc.

Doc/lib/libstdtypes.tex
Doc/lib/libstring.tex

index ae3e49276b6041ec4735bd1afe702255c9c57563..0693f0d80fc6f9e58da74057a1c3d9afcbf32749 100644 (file)
@@ -876,6 +876,9 @@ optional argument \var{deletechars} are removed, and the remaining
 characters have been mapped through the given translation table, which
 must be a string of length 256.
 
+You can use the \function{maketrans()} helper function in the
+\refmodule{string} module to create a translation table.
+
 For Unicode objects, the \method{translate()} method does not
 accept the optional \var{deletechars} argument.  Instead, it
 returns a copy of the \var{s} where all characters have been mapped
index 1828b2e1cd779da6fd99563b3b2eae20c0e32e0e..bc1649fdbfc2b1ee3c234079be2e82d0c72546f1 100644 (file)
@@ -220,7 +220,7 @@ objects.  They are not available as string methods.
 
 \begin{funcdesc}{maketrans}{from, to}
   Return a translation table suitable for passing to
-  \function{translate()} or \function{regex.compile()}, that will map
+  \function{translate()}, that will map
   each character in \var{from} into the character at the same position
   in \var{to}; \var{from} and \var{to} must have the same length.