Message395295
>>> 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. |
|
Date |
User |
Action |
Args |
2021-06-07 23:22:08 | finnjavier08 | set | recipients:
+ finnjavier08, ezio.melotti, mrabarnett |
2021-06-07 23:22:07 | finnjavier08 | set | messageid: <1623108127.98.0.605122773588.issue44341@roundup.psfhosted.org> |
2021-06-07 23:22:07 | finnjavier08 | link | issue44341 messages |
2021-06-07 23:22:07 | finnjavier08 | create | |
|