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
@@ -241,7 +241,7 @@ FAILED (errors=3)</samp></pre>
|
||||
def to_roman(n):
|
||||
'''convert integer to Roman numeral'''
|
||||
<a> if not (0 < n < 5000): <span class=u>②</span></a>
|
||||
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