8000 Missing PS1 prompt in tutorial example (GH-98921) · python/cpython@d22bde9 · GitHub
[go: up one dir, main page]

Skip to content

Commit d22bde9

Browse files
authored
Missing PS1 prompt in tutorial example (GH-98921)
1 parent ab57505 commit d22bde9

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)
0