mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
fix error message in roman2.py
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ roman_numeral_map = (('M', 1000),
|
||||
def to_roman(n):
|
||||
'''convert integer to Roman numeral'''
|
||||
if n > 3999:
|
||||
raise OutOfRangeError('number out of range (must be less than 3999)')
|
||||
raise OutOfRangeError('number out of range (must be less than 4000)')
|
||||
|
||||
result = ''
|
||||
for numeral, integer in roman_numeral_map:
|
||||
|
||||
+1
-1
@@ -319,7 +319,7 @@ FAILED (failures=1)</samp></pre>
|
||||
<pre class=pp><code>def to_roman(n):
|
||||
'''convert integer to Roman numeral'''
|
||||
if n > 3999:
|
||||
<a> raise OutOfRangeError('number out of range (must be less than 3999)') <span class=u>①</span></a>
|
||||
<a> raise OutOfRangeError('number out of range (must be less than 4000)') <span class=u>①</span></a>
|
||||
|
||||
result = ''
|
||||
for numeral, integer in roman_numeral_map:
|
||||
|
||||
Reference in New Issue
Block a user