mirror of https://github.com/python/cpython
Fix for PR#74 -- use int() instead of eval() to extract the exponent.
This commit is contained in:
parent
148ffbc886
commit
75ae7e7dfa
|
@ -38,7 +38,7 @@ def extract(s):
|
||||||
sign, intpart, fraction, exppart = res.group(1,2,3,4)
|
sign, intpart, fraction, exppart = res.group(1,2,3,4)
|
||||||
if sign == '+': sign = ''
|
if sign == '+': sign = ''
|
||||||
if fraction: fraction = fraction[1:]
|
if fraction: fraction = fraction[1:]
|
||||||
if exppart: expo = eval(exppart[1:])
|
if exppart: expo = int(exppart[1:])
|
||||||
else: expo = 0
|
else: expo = 0
|
||||||
return sign, intpart, fraction, expo
|
return sign, intpart, fraction, expo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue