Pulling in some hildon helpers from Dialcentral
[gonvert] / src / converters.py
index d4f9bc2..90001f1 100644 (file)
@@ -4,6 +4,9 @@ All classes for conversions are defined below:
 the return value is the converted value to or from base
 """
 
+# For the sake of eval'ing some code
+import math
+
 
 # used for Computer numbers base definitions.
 ALPHA_NUMERIC = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -67,11 +70,11 @@ def toroman(n):
        'xv'
        """
        if n < 0:
-               raise NotImplemented("Value out of roman comprehension")
+               raise NotImplementedError("Value out of roman comprehension")
        elif n == 0:
                ''
        elif n >= 4000:
-               raise NotImplemented("Value Out of Range")
+               raise NotImplementedError("Value Out of Range")
 
        base = 1
        s = ''