示例#1
0
文件: __init__.py 项目: hdeweirdt/imp
 def create_float(self, node):
     """
         Return float
     """
     value = str(node.text)
     Number.validate(value)
     return Number.cast(value)
示例#2
0
文件: __init__.py 项目: hdeweirdt/imp
 def create_integer(self, node):
     """
         Create an integer
     """
     value = str(node.text)
     if not Number.validate(value):
         raise Exception("Value does is not a valid integer")
 
     return Number.cast(value)