summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2022-11-01 02:24:26 (GMT)
committerGitHub <noreply@github.com>2022-11-01 02:24:26 (GMT)
commitd22bde983e58eaff9773f32a8324ddf9074e95e1 (patch)
treecff31aa2cb52bf75b289b5be0444a519c5a60a18
parentab575050709e2b313ca9a9585f09b6f4b0560318 (diff)
downloadcpython-d22bde983e58eaff9773f32a8324ddf9074e95e1.zip
cpython-d22bde983e58eaff9773f32a8324ddf9074e95e1.tar.gz
cpython-d22bde983e58eaff9773f32a8324ddf9074e95e1.tar.bz2
Missing PS1 prompt in tutorial example (GH-98921)
-rw-r--r--Doc/tutorial/controlflow.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index 99a77e7..52db51e 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -840,8 +840,9 @@ will always bind to the first parameter. For example::
But using ``/`` (positional only arguments), it is possible since it allows ``name`` as a positional argument and ``'name'`` as a key in the keyword arguments::
- def foo(name, /, **kwds):
- return 'name' in kwds
+ >>> def foo(name, /, **kwds):
+ ... return 'name' in kwds
+ ...
>>> foo(1, **{'name': 2})
True