acton
acton copied to clipboard
Can I use `isinstance(foo, list[str])`
Is is possible to use isintance(foo, list[str])?
actonc exited with code 1 / 0
std_err: Building project in /home/mzagozen/foss/orchestron/acton-yang
ERROR: Error when compiling yang.schema module: Syntax error
/home/mzagozen/foss/orchestron/acton-yang/src/yang/schema.act:1357:49:
|
1357 | elif isinstance(attr_value, list[str]):
| ^
unexpected '['
expecting '.' or a closing parenthesis
❯ actonc --version
acton 0.24.1.20250122.13.43.16
I have seen this error before (and worked around it)... but always presumed it was a type error. I just noticed this is actually a syntax error and not a type error. If the parser was to be fixed, could we actually support this? @nordlander ?
No, we cannot, not right now at least...