I'd like to use the match/case
statement but currently PyCharm does not like it and when I try to run this code:
def test(action):
match action:
case "send":
pass
case "create":
pass
case "dump":
pass
it tells me
match action:
^
SyntaxError: invalid syntax
I use python 3.9.1 and PyCharm 2021.2.3 Pro. The keywords match
and case
are blue so I guess PyCharm recognizes them but is not able to run it. What am I missing here?