parent
1d43bca863
commit
481752e211
|
@ -379,7 +379,7 @@ Appendix A -- Quick Intro
|
|||
|
||||
A ``match`` statement takes an expression and compares it to successive
|
||||
patterns given as one or more ``case`` blocks. This is superficially
|
||||
similar to a ``switch`` statement in C, Java or JavaScript (an many
|
||||
similar to a ``switch`` statement in C, Java or JavaScript (and many
|
||||
other languages), but much more powerful.
|
||||
|
||||
The simplest form compares a subject value against one or more literals::
|
||||
|
@ -533,7 +533,7 @@ Several other key features:
|
|||
case True:
|
||||
print("Yes!")
|
||||
|
||||
is exactly quivalent to this::
|
||||
is exactly equivalent to this::
|
||||
|
||||
if b is True:
|
||||
print("Yes!")
|
||||
|
|
Loading…
Reference in New Issue