Why is
match type('a'):
case list:
print('a list')
case str:
print('a string')
wrong with giving an error "SyntaxError: name capture 'list' makes remaining patterns unreachable"
while type('a')==str
is true
?
Why is
match type('a'):
case list:
print('a list')
case str:
print('a string')
wrong with giving an error "SyntaxError: name capture 'list' makes remaining patterns unreachable"
while type('a')==str
is true
?