diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-06-21 13:47:20 +0000 |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-06-21 13:47:20 +0000 |
commit | f484363baecbe69def74a4535cb9545869424dcb (patch) | |
tree | 6c7d1278b98589ceeb126fd342bd24537f9e52ae /Lib/fractions.py | |
parent | d897264464ba153c1c50c0745199392fab796eff (diff) | |
download | cpython-git-f484363baecbe69def74a4535cb9545869424dcb.tar.gz |
Use repr() for bad input strings; this makes the empty string or binary characters more visible
Diffstat (limited to 'Lib/fractions.py')
-rwxr-xr-x | Lib/fractions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/fractions.py b/Lib/fractions.py index 0d85f15d6c..f06e4d4038 100755 --- a/Lib/fractions.py +++ b/Lib/fractions.py @@ -70,7 +70,7 @@ class Fraction(Rational): input = numerator m = _RATIONAL_FORMAT.match(input) if m is None: - raise ValueError('Invalid literal for Fraction: ' + input) + raise ValueError('Invalid literal for Fraction: %r' % input) numerator = m.group('num') decimal = m.group('decimal') if decimal: |