

def dget(self, section, option, default=None, type=str):
    if (not self.has_option(section, option)):
        return default
    value = self.get(section, option)
    if (type is int):
        value = int(value)
    elif (type is bool):
        value = to_bool(value)
    elif (type is float):
        value = float(value)
    elif (type is not str):
        raise NotImplementedError()
    return value

dataset/ETHPy150Open circus-tent/circus/circus/config.py DefaultConfigParser.dget/original