Skip to content

Commit

Permalink
Issue python#11304: Input/output tutorial - PI is rounded not truncated.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettinger committed Feb 24, 2011
1 parent 659eb84 commit 756fe26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/tutorial/inputoutput.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Positional and keyword arguments can be arbitrarily combined::

An optional ``':'`` and format specifier can follow the field name. This allows
greater control over how the value is formatted. The following example
truncates Pi to three places after the decimal.
rounds Pi to three places after the decimal.

>>> import math
>>> print('The value of PI is approximately {0:.3f}.'.format(math.pi))
Expand Down

0 comments on commit 756fe26

Please sign in to comment.