summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-08-20 13:57:47 (GMT)
committerFred Drake <fdrake@acm.org>2002-08-20 13:57:47 (GMT)
commitffefb1df566c80881bdb353dcab51947d7c5ae5c (patch)
tree290e27f998395139d087f0165b43823a904fe7ac
parentb404bb7813f3d05b7d338ff5c1c5dc6c59b946c6 (diff)
downloadcpython-ffefb1df566c80881bdb353dcab51947d7c5ae5c.zip
cpython-ffefb1df566c80881bdb353dcab51947d7c5ae5c.tar.gz
cpython-ffefb1df566c80881bdb353dcab51947d7c5ae5c.tar.bz2
Clarify the endpos argument to the rx.match() method.
Closes SF bug #597177.
-rw-r--r--Doc/lib/libre.tex8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/lib/libre.tex b/Doc/lib/libre.tex
index 4a5eda3..bff13fa 100644
--- a/Doc/lib/libre.tex
+++ b/Doc/lib/libre.tex
@@ -668,8 +668,12 @@ attributes:
The optional parameter \var{endpos} limits how far the string will
be searched; it will be as if the string is \var{endpos} characters
- long, so only the characters from \var{pos} to \var{endpos} will be
- searched for a match.
+ long, so only the characters from \var{pos} to \code{\var{endpos} -
+ 1} will be searched for a match. If \var{endpos} is less than
+ \var{pos}, no match will be found, otherwise, if \var{rx} is a
+ compiled regular expression object,
+ \code{\var{rx}.match(\var{string}, 0, 50)} is equivalent to
+ \code{\var{rx}.match(\var{string}[:50], 0)}.
\end{methoddesc}
\begin{methoddesc}[RegexObject]{split}{string\optional{,