mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
- experimental: added two new attributes to the match object:
"lastgroup" is the name of the last matched capturing group, "lastindex" is the index of the same group. if no group was matched, both attributes are set to None. the (?P#) feature will be removed in the next relase.
This commit is contained in:
parent
c9c02c4cf3
commit
c2301730b8
4 changed files with 38 additions and 13 deletions
|
@ -21,6 +21,7 @@ typedef struct {
|
|||
PyObject* code; /* link to the code string object */
|
||||
int groups;
|
||||
PyObject* groupindex;
|
||||
PyObject* indexgroup;
|
||||
/* compatibility */
|
||||
PyObject* pattern; /* pattern source (or None) */
|
||||
int flags; /* flags used when compiling pattern source */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue