You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In IronPython 2.7.12 (and 3.4.0-beta1) RE_Match.groupdict() contains the mangled names of orginally unnamed groups,
when both named and unnamed groups are present in the expression. CPython only lists the explicitly named groups.
This is, of course, trivial to work around, but I still thought it worth the report.
Expected behavior:
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import re; re.match('(?P<foo>.*)(.*)', 'bar').groupdict()
{'foo': 'bar'}
Actual behavior:
IronPython 2.7.12 DEBUG (2.7.12.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.4510.0 (64-bit)]
Type "help", "copyright", "credits" or "license" for more information.
>>> import re; re.match('(?P<foo>.*)(.*)', 'bar').groupdict()
{'foo': 'bar', '___PyRegexNameMangled2127356294': ''}
The text was updated successfully, but these errors were encountered:
Description
In IronPython 2.7.12 (and 3.4.0-beta1) RE_Match.groupdict() contains the mangled names of orginally unnamed groups,
when both named and unnamed groups are present in the expression. CPython only lists the explicitly named groups.
This is, of course, trivial to work around, but I still thought it worth the report.
Expected behavior:
Actual behavior:
The text was updated successfully, but these errors were encountered: