[Python-checkins] docs: Link `match` statement in tutorial (GH-31396)

miss-islington webhook-mailer at python.org
Thu Feb 17 19:02:51 EST 2022


https://github.com/python/cpython/commit/35f55cc5c690a97853f1b544aac53574ab755b54
commit: 35f55cc5c690a97853f1b544aac53574ab755b54
branch: main
author: William Andrea <william.j.andrea at gmail.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-02-17T16:02:42-08:00
summary:

docs: Link `match` statement in tutorial (GH-31396)



Add a link to the `match` statement from its section in the tutorial.

This should be backported to 3.10.

[Initially submitted as #31395 but against the wrong branch. Thanks @Mariatta]

Automerge-Triggered-By: GH:Mariatta

files:
M Doc/tutorial/controlflow.rst

diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index fad8746014646..589263edd3571 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -250,7 +250,7 @@ at a more abstract level.  The :keyword:`!pass` is silently ignored::
 :keyword:`!match` Statements
 ============================
 
-A match statement takes an expression and compares its value to successive
+A :keyword:`match` statement takes an expression and compares its value to successive
 patterns given as one or more case blocks.  This is superficially
 similar to a switch statement in C, Java or JavaScript (and many
 other languages), but it can also extract components (sequence elements or



More information about the Python-checkins mailing list