-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-133510: Add links to more info for the match statement #133511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
d377b8c
08674f4
0fe1843
eb54817
804c8a3
05a62ee
184c150
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,8 +261,11 @@ Why isn't there a switch or case statement in Python? | |
|
||
In general, structured switch statements execute one block of code | ||
when an expression has a particular value or set of values. | ||
|
||
Since Python 3.10 one can easily match literal values, or constants | ||
within a namespace, with a ``match ... case`` statement. | ||
See :pep:`634` (specification) and :pep:`636` (tutorial) for details about the ``match`` statement. | ||
AA-Turner marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
An older alternative is a sequence of ``if... elif... elif... else``. | ||
|
||
For cases where you need to choose from a very large number of possibilities, | ||
|
Uh oh!
There was an error while loading. Please reload this page.