[Python-checkins] python/dist/src/Doc/lib libstdtypes.tex,1.101,1.102
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Tue, 06 Aug 2002 09:58:22 -0700
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.454,1.455
- Next message: [Python-checkins] python/dist/src/Lib/test string_tests.py,1.19,1.20 test_contains.py,1.9,1.10 test_string.py,1.18,1.19 test_unicode.py,1.60,1.61 test_userstring.py,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv20648/Doc/lib
Modified Files:
libstdtypes.tex
Log Message:
Committing patch #591250 which provides "str1 in str2" when str1 is a
string of longer than 1 character.
Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.101
retrieving revision 1.102
diff -C2 -d -r1.101 -r1.102
*** libstdtypes.tex 1 Aug 2002 03:10:45 -0000 1.101
--- libstdtypes.tex 6 Aug 2002 16:58:20 -0000 1.102
***************
*** 433,445 ****
\begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes}
! \lineiii{\var{x} in \var{s}}{\code{1} if an item of \var{s} is equal to \var{x}, else \code{0}}{}
\lineiii{\var{x} not in \var{s}}{\code{0} if an item of \var{s} is
! equal to \var{x}, else \code{1}}{}
\hline
\lineiii{\var{s} + \var{t}}{the concatenation of \var{s} and \var{t}}{}
! \lineiii{\var{s} * \var{n}\textrm{,} \var{n} * \var{s}}{\var{n} shallow copies of \var{s} concatenated}{(1)}
\hline
! \lineiii{\var{s}[\var{i}]}{\var{i}'th item of \var{s}, origin 0}{(2)}
! \lineiii{\var{s}[\var{i}:\var{j}]}{slice of \var{s} from \var{i} to \var{j}}{(2), (3)}
\hline
\lineiii{len(\var{s})}{length of \var{s}}{}
--- 433,445 ----
\begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes}
! \lineiii{\var{x} in \var{s}}{\code{1} if an item of \var{s} is equal to \var{x}, else \code{0}}{(1)}
\lineiii{\var{x} not in \var{s}}{\code{0} if an item of \var{s} is
! equal to \var{x}, else \code{1}}{(1)}
\hline
\lineiii{\var{s} + \var{t}}{the concatenation of \var{s} and \var{t}}{}
! \lineiii{\var{s} * \var{n}\textrm{,} \var{n} * \var{s}}{\var{n} shallow copies of \var{s} concatenated}{(2)}
\hline
! \lineiii{\var{s}[\var{i}]}{\var{i}'th item of \var{s}, origin 0}{(3)}
! \lineiii{\var{s}[\var{i}:\var{j}]}{slice of \var{s} from \var{i} to \var{j}}{(3), (4)}
\hline
\lineiii{len(\var{s})}{length of \var{s}}{}
***************
*** 462,466 ****
\begin{description}
! \item[(1)] Values of \var{n} less than \code{0} are treated as
\code{0} (which yields an empty sequence of the same type as
\var{s}). Note also that the copies are shallow; nested structures
--- 462,471 ----
\begin{description}
! \item[(1)] When \var{s} is a string or Unicode string object the
! \code{in} and \code{not in} operations act like a substring test. In
! Python versions before 2.3, \var{x} had to be a string of length 1.
! In Python 2.3 and beyond, \var{x} may be a string of any length.
!
! \item[(2)] Values of \var{n} less than \code{0} are treated as
\code{0} (which yields an empty sequence of the same type as
\var{s}). Note also that the copies are shallow; nested structures
***************
*** 490,499 ****
\end{verbatim}
! \item[(2)] If \var{i} or \var{j} is negative, the index is relative to
the end of the string: \code{len(\var{s}) + \var{i}} or
\code{len(\var{s}) + \var{j}} is substituted. But note that \code{-0} is
still \code{0}.
! \item[(3)] The slice of \var{s} from \var{i} to \var{j} is defined as
the sequence of items with index \var{k} such that \code{\var{i} <=
\var{k} < \var{j}}. If \var{i} or \var{j} is greater than
--- 495,504 ----
\end{verbatim}
! \item[(3)] If \var{i} or \var{j} is negative, the index is relative to
the end of the string: \code{len(\var{s}) + \var{i}} or
\code{len(\var{s}) + \var{j}} is substituted. But note that \code{-0} is
still \code{0}.
! \item[(4)] The slice of \var{s} from \var{i} to \var{j} is defined as
the sequence of items with index \var{k} such that \code{\var{i} <=
\var{k} < \var{j}}. If \var{i} or \var{j} is greater than
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.454,1.455
- Next message: [Python-checkins] python/dist/src/Lib/test string_tests.py,1.19,1.20 test_contains.py,1.9,1.10 test_string.py,1.18,1.19 test_unicode.py,1.60,1.61 test_userstring.py,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]