Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

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>

----------
nosy: +pablogsal
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44341>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to