]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add warning about use of lowercase/uppercase with maketrans().
authorGuido van Rossum <guido@python.org>
Thu, 11 Jun 1998 16:03:30 +0000 (16:03 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 11 Jun 1998 16:03:30 +0000 (16:03 +0000)
Doc/lib/libstring.tex

index 39392296842cd26e0a38134e0c80b66ff3a68a37..7d6f4bdaae09e8679b8303ebb6c872f2a80905e0 100644 (file)
@@ -144,6 +144,11 @@ Return a translation table suitable for passing to
 \function{translate()} or \function{regex.compile()}, 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. 
+
+\strong{Warning:} don't use strings derived from \code{lowercase} and
+\code{uppercase} as arguments; in some locales, these don't have the
+same length.  For case conversions, always use \function{lower()} and
+\function{upper()}.
 \end{funcdesc}
 
 \begin{funcdesc}{split}{s\optional{, sep\optional{, maxsplit}}}