diff --git a/libconf.py b/libconf.py index 4f546c0..5e7373d 100644 --- a/libconf.py +++ b/libconf.py @@ -70,6 +70,10 @@ def __getattr__(self, attr): except KeyError: raise AttributeError("Attribute %r not found" % attr) + def __setattr__(self, attr, value): + # Allow setting attributes via attribute access + self.__setitem__(attr, value) + class ConfigParseError(RuntimeError): '''Exception class raised on errors reading the libconfig input'''