summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2008-02-11 03:11:55 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2008-02-11 03:11:55 (GMT)
commitcd873fc1428b52620e26e44e19ce00a7ed79555c (patch)
tree5a9ab6230bf67ca6688be050b412a6692f67a989 /Lib
parent03d3abf3755274358ed6f3aeeae273a2779b27bb (diff)
downloadcpython-cd873fc1428b52620e26e44e19ce00a7ed79555c.zip
cpython-cd873fc1428b52620e26e44e19ce00a7ed79555c.tar.gz
cpython-cd873fc1428b52620e26e44e19ce00a7ed79555c.tar.bz2
Put an extra space into the repr of a Fraction:
Fraction(1, 2) instead of Fraction(1,2).
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/fractions.py2
-rw-r--r--Lib/test/test_fractions.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/fractions.py b/Lib/fractions.py
index 3f070de..123ecb6 100755
--- a/Lib/fractions.py
+++ b/Lib/fractions.py
@@ -187,7 +187,7 @@ class Fraction(Rational):
def __repr__(self):
"""repr(self)"""
- return ('Fraction(%r,%r)' % (self.numerator, self.denominator))
+ return ('Fraction(%r, %r)' % (self.numerator, self.denominator))
def __str__(self):
"""str(self)"""
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index cd35644..a79fedd 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -363,7 +363,7 @@ class FractionTest(unittest.TestCase):
self.assertFalse(R(5, 2) == 2)
def testStringification(self):
- self.assertEquals("Fraction(7,3)", repr(R(7, 3)))
+ self.assertEquals("Fraction(7, 3)", repr(R(7, 3)))
self.assertEquals("7/3", str(R(7, 3)))
self.assertEquals("7", str(R(7, 1)))