[Python-checkins] r52951 - python/trunk/Doc/lib/libstdtypes.tex python/trunk/Doc/lib/libstring.tex
georg.brandl
python-checkins at python.org
Thu Dec 7 10:30:07 CET 2006
Author: georg.brandl
Date: Thu Dec 7 10:30:06 2006
New Revision: 52951
Modified:
python/trunk/Doc/lib/libstdtypes.tex
python/trunk/Doc/lib/libstring.tex
Log:
RFE #1592899: mention string.maketrans() in docs for str.translate,
remove reference to the old regex module in the former's doc.
Modified: python/trunk/Doc/lib/libstdtypes.tex
==============================================================================
--- python/trunk/Doc/lib/libstdtypes.tex (original)
+++ python/trunk/Doc/lib/libstdtypes.tex Thu Dec 7 10:30:06 2006
@@ -876,6 +876,9 @@
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
Modified: python/trunk/Doc/lib/libstring.tex
==============================================================================
--- python/trunk/Doc/lib/libstring.tex (original)
+++ python/trunk/Doc/lib/libstring.tex Thu Dec 7 10:30:06 2006
@@ -220,7 +220,7 @@
\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.
More information about the Python-checkins
mailing list