Message395298
I don't understand this example.
> importing re.match directly into __main__ replaces the keyword with the function.
It has not replaced anything, if you do a match statement it works and doesn't call your function. For example:
>>> x = [1,2]
>>>
>>> def match(*args):
... print("Oh no")
...
>>> match x:
... case [y,z]:
... print(y,z)
...
1 2
Here "match" when used as a statement has not been replaced by the function that prints "oh no" so the match statement works as expected and so does the function:
>>> match
<function match at 0x7f7c173c5ff0> |
|
Date |
User |
Action |
Args |
2021-06-08 00:06:39 | pablogsal | set | recipients:
+ pablogsal, ezio.melotti, mrabarnett, steven.daprano |
2021-06-08 00:06:39 | pablogsal | set | messageid: <1623110799.63.0.512192381316.issue44341@roundup.psfhosted.org> |
2021-06-08 00:06:39 | pablogsal | link | issue44341 messages |
2021-06-08 00:06:39 | pablogsal | create | |
|