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
This is probably a special case of #1141, but this usage is explicitly documented in the standard library. From the docs for re match objects for both version 2 and version 3 (emphasis added):
If the regular expression uses the (?P<name>...) syntax, the groupN arguments may also be strings identifying groups by their group name.
$ mypy --version
mypy 0.501
$ python2.7 re_match_group.py
bar
$ mypy -2 re_match_group.py
re_match_group.py:5: error: No overload variant of "group" of "Match" matches argument types [builtins.unicode]
… and 3 …
$ python3.6 re_match_group.py
bar
$ mypy re_match_group.py
re_match_group.py:5: error: No overload variant of "group" of "Match" matches argument types [builtins.unicode]
The text was updated successfully, but these errors were encountered:
This is probably a special case of #1141, but this usage is explicitly documented in the standard library. From the docs for
re
match objects for both version 2 and version 3 (emphasis added):Result fails in 2 …
… and 3 …
The text was updated successfully, but these errors were encountered: