Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior using match statements with python 3.12.6 and py-mon 2.0.5 #29

Open
carlospalavecino opened this issue Sep 30, 2024 · 0 comments

Comments

@carlospalavecino
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant