How to do structural pattern matching in Python 3.10 with a type to match?
I am trying to match a type in Python 3.10 using the console:
t = 12.0
match type(t):
case int:
print("int")
case float:
print("float")
And I get this error:
File "", line 2
SyntaxError: name capture 'int' makes remaining patterns unreachable
How can I fix this issue?