diff options
Diffstat (limited to 'Doc/whatsnew/3.10.rst')
-rw-r--r-- | Doc/whatsnew/3.10.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 8d8e3fa..63c7c2a 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -491,11 +491,11 @@ The associated action to the case is executed after a match:: case 418: return "I'm a teapot" case _: - return "Something's wrong with the Internet" + return "Something's wrong with the internet" If the above function is passed a ``status`` of 418, "I'm a teapot" is returned. If the above function is passed a ``status`` of 500, the case statement with -``_`` will match as a wildcard, and "Something's wrong with the Internet" is +``_`` will match as a wildcard, and "Something's wrong with the internet" is returned. Note the last block: the variable name, ``_``, acts as a *wildcard* and insures the subject will always match. The use of ``_`` is optional. |