Add a guard rail around Roman.i2r

main
Dan Buch 7 months ago
parent 5b55118373
commit 345464d0d4
Signed by: meatballhat
GPG Key ID: A12F782281063434

@ -102,6 +102,9 @@ class Roman:
@classmethod
def i2r(cls, i: int) -> str:
if i > 100_000:
raise ValueError(f"{i} is too silly")
r: list[str] = []
for int_val, roman_val in sorted(cls.ALL_REVERSE.items(), reverse=True):

Loading…
Cancel
Save