[Python-checkins] Missing PS1 prompt in tutorial example (GH-98921)

rhettinger webhook-mailer at python.org
Mon Oct 31 22:24:32 EDT 2022


https://github.com/python/cpython/commit/d22bde983e58eaff9773f32a8324ddf9074e95e1
commit: d22bde983e58eaff9773f32a8324ddf9074e95e1
branch: main
author: Manuel Kaufmann <humitos at gmail.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2022-10-31T21:24:26-05:00
summary:

Missing PS1 prompt in tutorial example (GH-98921)

files:
M Doc/tutorial/controlflow.rst

diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index 99a77e7addd7..52db51e84cd5 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
 



More information about the Python-checkins mailing list