code: def _cast(self, value):
          
          if value.isdigit():
              value = int(value)
          elif re.compile("^\d+\.\d+").match(value):
              value = float(value)
          return value
docs: Try to cast value to int or float if possible
          :param value: value to cast
          :return: casted value