mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Add MatchObject.groups which got messed up during a merge.
This commit is contained in:
parent
b3959bd63e
commit
48f16f9297
1 changed files with 3 additions and 0 deletions
|
@ -871,6 +871,9 @@ Match Objects
|
||||||
>>> m.group(1) # Returns only the last match.
|
>>> m.group(1) # Returns only the last match.
|
||||||
'c3'
|
'c3'
|
||||||
|
|
||||||
|
|
||||||
|
.. method:: MatchObject.groups(default=None)
|
||||||
|
|
||||||
Return a tuple containing all the subgroups of the match, from 1 up to however
|
Return a tuple containing all the subgroups of the match, from 1 up to however
|
||||||
many groups are in the pattern. The *default* argument is used for groups that
|
many groups are in the pattern. The *default* argument is used for groups that
|
||||||
did not participate in the match; it defaults to ``None``. (Incompatibility
|
did not participate in the match; it defaults to ``None``. (Incompatibility
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue