xmlclass/xmlclass.py
changeset 1852 70c1cc354a8f
parent 1850 614396cbffbf
child 1860 4eeddef7f973
equal deleted inserted replaced
1851:1b8b5324506c 1852:70c1cc354a8f
   238                              (value, maxExclusive))
   238                              (value, maxExclusive))
   239         return value
   239         return value
   240     return GetInteger
   240     return GetInteger
   241 
   241 
   242 
   242 
   243 def GenerateFloatExtraction(type, extra_values=[]):
   243 def GenerateFloatExtraction(type, extra_values=None):
   244     """
   244     """
   245     Function that generates an extraction function for float
   245     Function that generates an extraction function for float
   246     @param type: name of the type of float
   246     @param type: name of the type of float
   247     @return: function generated
   247     @return: function generated
   248     """
   248     """
       
   249     extra_values = [] if extra_values is None else extra_values
       
   250 
   249     def GetFloat(attr, extract=True):
   251     def GetFloat(attr, extract=True):
   250         """
   252         """
   251         Function that extracts a float from a tree node or a string
   253         Function that extracts a float from a tree node or a string
   252         @param attr: tree node containing data to extract or data as a string
   254         @param attr: tree node containing data to extract or data as a string
   253         @param extract: attr is a tree node or not
   255         @param extract: attr is a tree node or not