mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
syntax error in raise statement
This commit is contained in:
+2
-2
@@ -73,9 +73,9 @@ FAILED (failures=1)</samp></pre>
|
||||
<pre class=pp><code>def from_roman(s):
|
||||
'''convert Roman numeral to integer'''
|
||||
<a> if not s: <span class=u>①</span></a>
|
||||
raise InvalidRomanNumeralError, 'Input can not be blank'
|
||||
raise InvalidRomanNumeralError('Input can not be blank')
|
||||
if not re.search(romanNumeralPattern, s):
|
||||
<a> raise InvalidRomanNumeralError, 'Invalid Roman numeral: {}'.format(s) <span class=u>②</span></a>
|
||||
<a> raise InvalidRomanNumeralError('Invalid Roman numeral: {}'.format(s)) <span class=u>②</span></a>
|
||||
|
||||
result = 0
|
||||
index = 0
|
||||
|
||||
Reference in New Issue
Block a user