I also (with others) prefer `else:` or perhaps `case else:` to using the`_` variable. The latter is obscure, and woudn't sit well with code that already uses that variable for its own purposes.

I think that's done for consistency. '_' is a wildcard and you can have:

    case (_, _):

to match any 2-tuple, so:

    case _:

would match any value, and can thus already serve as the default.

Consistency with what?  Where else is `_` currently used as a wildcard?
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/SXLNU6FB3Z5AT6APEQUYVGUAJKJH7BZO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to