mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
gh-122944: Fix incorrect prompt strings in the Python Tutorial (#122949)
In the REPL, top level comments are followed by a primary, not secondary prompt. Fix the places in the in the tutorial that use the latter.
This commit is contained in:
parent
1795d6ceba
commit
be90648fb2
4 changed files with 10 additions and 10 deletions
|
|
@ -87,12 +87,12 @@ Some examples::
|
|||
>>> print(s)
|
||||
The value of x is 32.5, and y is 40000...
|
||||
>>> # The repr() of a string adds string quotes and backslashes:
|
||||
... hello = 'hello, world\n'
|
||||
>>> hello = 'hello, world\n'
|
||||
>>> hellos = repr(hello)
|
||||
>>> print(hellos)
|
||||
'hello, world\n'
|
||||
>>> # The argument to repr() may be any Python object:
|
||||
... repr((x, y, ('spam', 'eggs')))
|
||||
>>> repr((x, y, ('spam', 'eggs')))
|
||||
"(32.5, 40000, ('spam', 'eggs'))"
|
||||
|
||||
The :mod:`string` module contains a :class:`~string.Template` class that offers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue