You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My idea is to introduce default: as an alias of case _: (which also means disallowing default from being an identifier). If reserving default is not an option, just use else.
The text was updated successfully, but these errors were encountered:
The examples included in this repository are just that: examples. They are meant to demonstrate what is possible to do with ideas. So, I do not plan to deprecate any examples - especially since they work with Python 3.6.
Modifying it so that it does not conflict with the match statement is likely a good idea. If you want to submit a PR that does just that, you are more than welcome. :-) Otherwise, I'll eventually do it myself, but this is not a high priority for me.
switch.py
should be deprecated, or at least modified because ofmatch
statements that debuted in 3.10.6.Relevant PEPs:
match
statements look like this:My idea is to introduce
default:
as an alias ofcase _:
(which also means disallowingdefault
from being an identifier). If reservingdefault
is not an option, just useelse
.The text was updated successfully, but these errors were encountered: