Closed stefanuytterhoeven closed 1 year ago
Pyscript
implements a python interpreter using async methods. I wasn't aware this language feature was added, so I'll need to add support for it.
I reviewed PEP 636 and it looks quite difficult to implement in the pyscript
interpreter. So I'm not planning to support this.
I'd recommend putting your match
code in a function with the @pyscript_compile
decorator. That way you'll have access to full native Python functionality inside that function.
Thx!
@stefanuytterhoeven could you please update or close the issue? Thank you
Solved
first of all, I'm no expert in Python.
but, from what I've read, the match/case statement should be supported as of version 3.10 of python.
In HA, we are at 3.11 now. When retrieving the python version in pyscript it says 3.11
So, when I try to use match/case like
this gives me error: NotImplementedError: ..... not implemented ast ast_match