To use the | operator in <3.10, one can do from __future__ import annotations
. Is something similar possible for structural pattern matching, i.e. writing things like
match x:
case 1:
print("x is 1")
case 2:
print("x is 2")
To use the | operator in <3.10, one can do from __future__ import annotations
. Is something similar possible for structural pattern matching, i.e. writing things like
match x:
case 1:
print("x is 1")
case 2:
print("x is 2")
Copyright © 2021 Jogjafile Inc.