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

Skip to content

Commit 2bd4795

Browse files
committed
Issue python#11304: Input/output tutorial - PI is rounded not truncated.
1 parent f4d2b3d commit 2bd4795

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/tutorial/inputoutput.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ convert the value before it is formatted. ::
160160

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

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

0 commit comments

Comments
 (0)