Private GIT

Skip to content
Snippets Groups Projects
Commit 56c26204 authored by Nic Wolfe's avatar Nic Wolfe
Browse files

Fixed roman numeral library to allow unicode input

parent 2ac8661a
Branches
Tags
No related merge requests found
......@@ -85,7 +85,7 @@ def roman_to_int(input):
...
ValueError: input is not a valid roman numeral: IL
"""
if type(input) != type(""):
if type(input) not in (str, unicode):
raise TypeError, "expected string, got %s" % type(input)
input = input.upper()
nums = ['M', 'D', 'C', 'L', 'X', 'V', 'I']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment