8000 +1 · python/cpython@3687e34 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3687e34

Browse files
committed
+1
1 parent c274774 commit 3687e34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/fractions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ def __new__(cls, numerator=0, denominator=None):
282282
denominator *= 10**-exp
283283
else:
284284
raise ValueError
285-
except ValueError:
285+
except ValueError as exc:
286+
if exc.args and re.match('^Exceeds', exc.args[0]):
287+
raise
286288
raise ValueError('Invalid literal for Fraction: %r' %
287289
fraction_literal)
288290

0 commit comments

Comments
 (0)
0