commit | f484363baecbe69def74a4535cb9545869424dcb | [log] [tgz] |
---|---|---|
author | Andrew M. Kuchling <amk@amk.ca> | Sat Jun 21 13:47:20 2008 +0000 |
committer | Andrew M. Kuchling <amk@amk.ca> | Sat Jun 21 13:47:20 2008 +0000 |
tree | 6c7d1278b98589ceeb126fd342bd24537f9e52ae | |
parent | d897264464ba153c1c50c0745199392fab796eff [diff] [blame] |
Use repr() for bad input strings; this makes the empty string or binary characters more visible
diff --git a/Lib/fractions.py b/Lib/fractions.py index 0d85f15..f06e4d4 100755 --- a/Lib/fractions.py +++ b/Lib/fractions.py
@@ -70,7 +70,7 @@ 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: