[Python-checkins] python/dist/src/Doc/lib libstring.tex,1.50,1.51
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sat, 12 Jul 2003 19:06:49 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv17790
Modified Files:
libstring.tex
Log Message:
SF bug #706546: u''.translate not documented
Clarified the difference between translate methods for string objects and
Unicode objects.
Index: libstring.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstring.tex,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** libstring.tex 17 Apr 2003 23:07:13 -0000 1.50
--- libstring.tex 13 Jul 2003 02:06:47 -0000 1.51
***************
*** 277,281 ****
present), and then translate the characters using \var{table}, which
must be a 256-character string giving the translation for each
! character value, indexed by its ordinal.
\end{funcdesc}
--- 277,291 ----
present), and then translate the characters using \var{table}, which
must be a 256-character string giving the translation for each
! character value, indexed by its ordinal.
!
! 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
! through the given translation table which must be a mapping of
! Unicode ordinals to Unicode ordinals, Unicode strings or \code{None}.
! Unmapped characters are left untouched. Characters mapped to \code{None}
! are deleted. Note, a more flexible approach is to create a custom
! character mapping codec using the \refmodule{codecs} module (see
! \module{encodings.cp1251} for an example).
\end{funcdesc}