Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c567fc

Browse files
Update Lib/fractions.py
Co-authored-by: Pieter Eendebak <[email protected]>
1 parent 05e9110 commit 7c567fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/fractions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def __new__(cls, numerator=0, denominator=None):
243243
numerator = int(num)
244244
elif num and not is_fraction_format:
245245
denominator = 1
246-
num, _, exp = num.replace('E', 'e').partition('e')
247-
if _ and not exp:
246+
num, is_exp_format, exp = num.replace('E', 'e').partition('e')
247+
if is_exp_format and not exp:
248248
raise ValueError
249249
num, _, decimal = num.partition('.')
250250
if num:

0 commit comments

Comments
 (0)