py-mon
py-mon copied to clipboard
Strange behavior using match statements with python 3.12.6 and py-mon 2.0.5
Hi, I found a strange behavior using py-mon when I want to use match statements. Running the same script with python match.py
works as expected.
I checked the python docs and the code seems to be correct. Even I did a fairly basic abstraction to discart code errors.Could it be possible that there is some conflict with the keyword "match"?
I am running the script on macos sonoma and python 3.12.6 and py-mon 2.0.5 Thanks in advance.
example match.py
myvar = "Hello"
match myvar:
case "Hello":
print("Hello World")
case "Hello 2":
print("Hello World 2")
case _:
print("No match")
stdout
[pymon] starting match.py
File ".../match.py", line 3
match myvar:
^
SyntaxError: invalid syntax