mirror of https://github.com/python/cpython
Add ordering info for findall and finditer.
This commit is contained in:
parent
3de1e69dc7
commit
b46d6ff279
|
@ -575,10 +575,11 @@ form.
|
||||||
.. function:: findall(pattern, string[, flags])
|
.. function:: findall(pattern, string[, flags])
|
||||||
|
|
||||||
Return all non-overlapping matches of *pattern* in *string*, as a list of
|
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
|
strings. The *string* is scanned left-to-right, and matches are returned in
|
||||||
groups; this will be a list of tuples if the pattern has more than one group.
|
the order found. If one or more groups are present in the pattern, return a
|
||||||
Empty matches are included in the result unless they touch the beginning of
|
list of groups; this will be a list of tuples if the pattern has more than
|
||||||
another match.
|
one group. Empty matches are included in the result unless they touch the
|
||||||
|
beginning of another match.
|
||||||
|
|
||||||
.. versionadded:: 1.5.2
|
.. versionadded:: 1.5.2
|
||||||
|
|
||||||
|
@ -589,8 +590,10 @@ form.
|
||||||
.. function:: finditer(pattern, string[, flags])
|
.. function:: finditer(pattern, string[, flags])
|
||||||
|
|
||||||
Return an :term:`iterator` yielding :class:`MatchObject` instances over all
|
Return an :term:`iterator` yielding :class:`MatchObject` instances over all
|
||||||
non-overlapping matches for the RE *pattern* in *string*. Empty matches are
|
non-overlapping matches for the RE *pattern* in *string*. The *string* is
|
||||||
included in the result unless they touch the beginning of another match.
|
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
|
.. versionadded:: 2.2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue