mirror of
https://github.com/python/cpython.git
synced 2025-12-11 11:31:05 +00:00
Issue 24454: Added whatsnew entry, removed __getitem__ from match_methods. Thanks Serhiy Storchaka.
This commit is contained in:
parent
b7e3535a08
commit
b5690864ba
2 changed files with 4 additions and 1 deletions
|
|
@ -724,6 +724,10 @@ Added support of modifier spans in regular expressions. Examples:
|
||||||
``'(?i)g(?-i:v)r'`` matches ``'GvR'`` and ``'gvr'``, but not ``'GVR'``.
|
``'(?i)g(?-i:v)r'`` matches ``'GvR'`` and ``'gvr'``, but not ``'GVR'``.
|
||||||
(Contributed by Serhiy Storchaka in :issue:`433028`.)
|
(Contributed by Serhiy Storchaka in :issue:`433028`.)
|
||||||
|
|
||||||
|
Match object groups can be accessed by ``__getitem__``, which is
|
||||||
|
equivalent to ``group()``. So ``mo['name']`` is now equivalent to
|
||||||
|
``mo.group('name')``. (Contributed by Eric Smith in :issue:`24454`.)
|
||||||
|
|
||||||
|
|
||||||
readline
|
readline
|
||||||
--------
|
--------
|
||||||
|
|
|
||||||
|
|
@ -2733,7 +2733,6 @@ static PyMethodDef match_methods[] = {
|
||||||
_SRE_SRE_MATCH_EXPAND_METHODDEF
|
_SRE_SRE_MATCH_EXPAND_METHODDEF
|
||||||
_SRE_SRE_MATCH___COPY___METHODDEF
|
_SRE_SRE_MATCH___COPY___METHODDEF
|
||||||
_SRE_SRE_MATCH___DEEPCOPY___METHODDEF
|
_SRE_SRE_MATCH___DEEPCOPY___METHODDEF
|
||||||
{"__getitem__", (PyCFunction)match_getitem, METH_O|METH_COEXIST, match_getitem_doc},
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue