]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify the endpos argument to the rx.match() method.
authorFred Drake <fdrake@acm.org>
Tue, 20 Aug 2002 13:58:12 +0000 (13:58 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 20 Aug 2002 13:58:12 +0000 (13:58 +0000)
Closes SF bug #597177.

Doc/lib/libre.tex

index d7abffe3c3b4a07d1a93663f20a9882750cd97bf..52330daf4a4b819f693cefc63647136bd06a196a 100644 (file)
@@ -679,8 +679,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{,