mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #6354: More fixes for code examples involving the repr of a float.
This commit is contained in:
parent
6e6565b64b
commit
5a55b61a2a
6 changed files with 13 additions and 13 deletions
|
@ -52,10 +52,10 @@ Some examples::
|
|||
'Hello, world.'
|
||||
>>> repr(s)
|
||||
"'Hello, world.'"
|
||||
>>> str(0.1)
|
||||
'0.1'
|
||||
>>> repr(0.1)
|
||||
'0.10000000000000001'
|
||||
>>> str(1.0/7.0)
|
||||
'0.142857142857'
|
||||
>>> repr(1.0/7.0)
|
||||
'0.14285714285714285'
|
||||
>>> x = 10 * 3.25
|
||||
>>> y = 200 * 200
|
||||
>>> s = 'The value of x is ' + repr(x) + ', and y is ' + repr(y) + '...'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue