mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
Issue #9337: Make float.__str__ identical to float.__repr__.
(And similarly for complex numbers.)
This commit is contained in:
parent
b6c5074920
commit
388122d43b
10 changed files with 63 additions and 85 deletions
|
@ -617,7 +617,9 @@ class ReprTestCase(unittest.TestCase):
|
|||
negs = '-'+s
|
||||
self.assertEqual(s, repr(float(s)))
|
||||
self.assertEqual(negs, repr(float(negs)))
|
||||
|
||||
# Since Python 3.2, repr and str are identical
|
||||
self.assertEqual(repr(float(s)), str(float(s)))
|
||||
self.assertEqual(repr(float(negs)), str(float(negs)))
|
||||
|
||||
@requires_IEEE_754
|
||||
class RoundTestCase(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue