News

That said, enums tend to be the most familiar and idiomatic way to do this in Python. You cannot match against variable contents through indexing. For instance, case commands[0]: would be rejected ...
An outgrowth of previous failed attempts to add a switch/case-like syntax to Python, structural pattern matching lets you match variables against one of a set of possible values (as with switch ...
Post a runnable example that demonstrates the unwanted behavior. There are a number of different ways to cause that sort of thing in Python.