This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author finnjavier08
Recipients ezio.melotti, finnjavier08, mrabarnett
Date 2021-06-07.23:22:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623108127.98.0.605122773588.issue44341@roundup.psfhosted.org>
In-reply-to
Content
>>> import re
>>> re.match('str', 'str').group()
'str'
>>> match 'str':
...     case 'str':
...         print('match!')
...
match!
>>> from re import match
>>> match
<function re.match ...>

As the above example demonstrates, while re.match doesn't raise an error despite having a keyword name, importing re.match directly into __main__ replaces the keyword with the function. The obvious solution is to rename re.match, but this would break many, many pieces of code.
History
Date User Action Args
2021-06-07 23:22:08finnjavier08setrecipients: + finnjavier08, ezio.melotti, mrabarnett
2021-06-07 23:22:07finnjavier08setmessageid: <1623108127.98.0.605122773588.issue44341@roundup.psfhosted.org>
2021-06-07 23:22:07finnjavier08linkissue44341 messages
2021-06-07 23:22:07finnjavier08create