File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -289,7 +289,8 @@ similar to a switch statement in C, Java or JavaScript (and many
289289other languages), but it's more similar to pattern matching in
290290languages like Rust or Haskell. Only the first pattern that matches
291291gets executed and it can also extract components (sequence elements
292- or object attributes) from the value into variables.
292+ or object attributes) from the value into variables. If no case matches,
293+ none of the branches is executed.
293294
294295The simplest form compares a subject value against one or more literals::
295296
@@ -305,7 +306,7 @@ The simplest form compares a subject value against one or more literals::
305306 return "Something's wrong with the internet"
306307
307308Note the last block: the "variable name" ``_ `` acts as a *wildcard * and
308- never fails to match. If no case matches, none of the branches is executed.
309+ never fails to match.
309310
310311You can combine several literals in a single pattern using ``| `` ("or")::
311312
You can’t perform that action at this time.
0 commit comments