Pretty cute syntax, but not what I'd wanted. It takes something that is already trivial to write and makes it simpler. Not a lot of "bang for your syntax bucks" so to speak. E.g the interpreter example from the PEP could have been written:
parts = command.split()
if not (0 < len(parts) < 3):
raise TypeError(...)
cmd, arg = parts
if cmd == 'quit':
...
elif cmd == 'get':
character.get(arg, current_room)
elif ...:
...
For more advanced examples, you'd use dictionary dispatch anyway. Will this syntax work with numpy?
Your code is buggy, though. It will only ever accept two parts because of `cmd, arg = parts`, so `["quit"]` will fail, and each command might accept a different number of parts, so you can't just test `0 < len(parts) < 3` for all of them. The pattern matching version is harder to get wrong.
Your snippet would be condensed into 1 indentation block with pattern matching. In scheme it'd be even more explicit that we're deconstructing command, therefore much much easier to follow logic. No need to worry about cmd, args, etc.