def __init__(self, strict=True, **kwargs): self.strict = strict if not self.strict: # apply defaults to missing parameters kwargs = Parameters._fill_defaults(**kwargs) ReadOnlyDict.__init__(self, **kwargs)
def __init__(self, strict=True, **kwargs): self.strict = strict self.spec = kwargs.pop("spec", "defaults") self._id = None if not self.strict: # apply defaults to missing parameters kwargs = Parameters._fill_defaults(**kwargs) ReadOnlyDict.__init__(self, **kwargs)
def __init__(self, strict=True, **kwargs): self.strict = strict if not self.strict: # apply defaults to missing parameters for name, default in PARAMETERS.items(): if name not in kwargs: if callable(default): default = default() kwargs[name] = default if set(kwargs) & set(COMM_PARAMETERS.keys()): for name, default in COMM_PARAMETERS.items(): if name not in kwargs: if callable(default): default = default() kwargs[name] = default ReadOnlyDict.__init__(self, **kwargs)