[Python-checkins] r65139 - python/trunk/Doc/library/re.rst

georg.brandl python-checkins at python.org
Sat Jul 19 15:48:44 CEST 2008


Author: georg.brandl
Date: Sat Jul 19 15:48:44 2008
New Revision: 65139

Log:
Add ordering info for findall and finditer.


Modified:
   python/trunk/Doc/library/re.rst

Modified: python/trunk/Doc/library/re.rst
==============================================================================
--- python/trunk/Doc/library/re.rst	(original)
+++ python/trunk/Doc/library/re.rst	Sat Jul 19 15:48:44 2008
@@ -575,10 +575,11 @@
 .. function:: findall(pattern, string[, flags])
 
    Return all non-overlapping matches of *pattern* in *string*, as a list of
-   strings.  If one or more groups are present in the pattern, return a list of
-   groups; this will be a list of tuples if the pattern has more than one group.
-   Empty matches are included in the result unless they touch the beginning of
-   another match.
+   strings.  The *string* is scanned left-to-right, and matches are returned in
+   the order found.  If one or more groups are present in the pattern, return a
+   list of groups; this will be a list of tuples if the pattern has more than
+   one group.  Empty matches are included in the result unless they touch the
+   beginning of another match.
 
    .. versionadded:: 1.5.2
 
@@ -589,8 +590,10 @@
 .. function:: finditer(pattern, string[, flags])
 
    Return an :term:`iterator` yielding :class:`MatchObject` instances over all
-   non-overlapping matches for the RE *pattern* in *string*.  Empty matches are
-   included in the result unless they touch the beginning of another match.
+   non-overlapping matches for the RE *pattern* in *string*.  The *string* is
+   scanned left-to-right, and matches are returned in the order found.  Empty
+   matches are included in the result unless they touch the beginning of another
+   match.
 
    .. versionadded:: 2.2
 


More information about the Python-checkins mailing list