3 ms·
The two-space compromise might work: def handle(command): match command.split(): case ["quit"]: print("Goodbye!")
by ben509 6y ago
The two-space compromise might work:
def handle(command):
match command.split():
case ["quit"]:
print("Goodbye!")
quit_game()
case ["look"]:
current_room.describe()
It'll be a bit odd, though.
- rytill 6y agoI have never really pushed hard on style in my software journey. But this is different. That code sample is horrifying.