mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Add warning about use of lowercase/uppercase with maketrans().
This commit is contained in:
parent
08d6be4871
commit
a3eebe60dc
1 changed files with 5 additions and 0 deletions
|
@ -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}}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue