Skip to content

Commit 2d43bc2

Browse files
committed
merge with 3.5
2 parents 72f2ef4 + f1d371b commit 2d43bc2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/tutorial/inputoutput.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ Positional and keyword arguments can be arbitrarily combined::
153153
``'!a'`` (apply :func:`ascii`), ``'!s'`` (apply :func:`str`) and ``'!r'``
154154
(apply :func:`repr`) can be used to convert the value before it is formatted::
155155

156-
>>> import math
157-
>>> print('The value of PI is approximately {}.'.format(math.pi))
158-
The value of PI is approximately 3.14159265359.
159-
>>> print('The value of PI is approximately {!r}.'.format(math.pi))
160-
The value of PI is approximately 3.141592653589793.
156+
>>> contents = 'eels'
157+
>>> print('My hovercraft is full of {}.'.format(contents))
158+
My hovercraft is full of eels.
159+
>>> print('My hovercraft is full of {!r}.'.format(contents))
160+
My hovercraft is full of 'eels'.
161161

162162
An optional ``':'`` and format specifier can follow the field name. This allows
163163
greater control over how the value is formatted. The following example

0 commit comments

Comments
 (0)