Skip to content

Commit 3cb3ff0

Browse files
authored
Merge pull request #119 from cs50/develop
Handles OverflowError from get_float
2 parents ad5cbc5 + 2f2b23f commit 3cb3ff0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
package_dir={"": "src"},
1717
packages=["cs50"],
1818
url="https://github.com/cs50/python-cs50",
19-
version="5.0.3"
19+
version="5.0.4"
2020
)

src/cs50/cs50.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def get_float(prompt):
8080
if len(s) > 0 and re.search(r"^[+-]?\d*(?:\.\d*)?$", s):
8181
try:
8282
return float(s)
83-
except ValueError:
83+
except (OverflowError, ValueError):
8484
pass
8585

8686

0 commit comments

Comments
 (0)