-
Notifications
You must be signed in to change notification settings - Fork 64
How to spell anonymous default case? #6
Comments
I feel this discussion is closely connected to issue #5 (as I mentioned there) and depends on the semantics that we want to convey. If matches have to be exhaustive, I would argue strongly against the use of My issue with Anyway, using the
However, if we went for an
The reason for this being that the
|
Okay, there's a principle of using the fewest ingredients necessary somewhere. Let's use 'case _:' instead of 'else:'. |
We could either use
case _: ...
orelse: ...
.In favor of
else
, this is what you use forif-elif-elif
.Against
else
:else
(for-else
/while-else
,if-else
,try-except-else
).case _: ...
_
as a pattern is useful inside nested patterns too, e.g.The text was updated successfully, but these errors were encountered: