mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 15:00:18 +00:00
fix message on OutOfRangeError
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ roman_numeral_pattern = re.compile('''
|
||||
def to_roman(n):
|
||||
'''convert integer to Roman numeral'''
|
||||
if not (0 < n < 5000):
|
||||
raise OutOfRangeError('number out of range (must be 0..4999)')
|
||||
raise OutOfRangeError('number out of range (must be 1..4999)')
|
||||
if not isinstance(n, int):
|
||||
raise NotIntegerError('non-integers can not be converted')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user