Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e02ce48

Browse files
[3.11] Missing PS1 prompt in tutorial example (GH-98921) (GH-98944)
(cherry picked from commit d22bde9) Co-authored-by: Manuel Kaufmann <[email protected]> Automerge-Triggered-By: GH:rhettinger
1 parent 20c258c commit e02ce48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/tutorial/controlflow.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,9 @@ will always bind to the first parameter. For example::
840840

841841
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::
842842

843-
def foo(name, /, **kwds):
844-
return 'name' in kwds
843+
>>> def foo(name, /, **kwds):
844+
... return 'name' in kwds
845+
...
845846
>>> foo(1, **{'name': 2})
846847
True
847848

0 commit comments

Comments
 (0)