]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Missing PS1 prompt in tutorial example (GH-98921)
authorManuel Kaufmann <humitos@gmail.com>
Tue, 1 Nov 2022 02:24:26 +0000 (03:24 +0100)
committerGitHub <noreply@github.com>
Tue, 1 Nov 2022 02:24:26 +0000 (21:24 -0500)
Doc/tutorial/controlflow.rst

index 99a77e7addd7741badd66f6f0dc84f02bc27bfec..52db51e84cd5fca4c008613f92dca77c72fd53cd 100644 (file)
@@ -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