On Fri, May 22, 2015 at 2:55 PM, Tim Chase <python.l...@tim.thechases.com> wrote: > I've wondered this on multiple occasions, as I've wanted to just make > an attribute bag and have to do something like > > class AttrBag(object): pass > ab = AttrBag() > ab.x = 42 > ab.y = "some other value" > > because just doing > > ab = object() > > raises the AttributeError Marko highlights. :-/
This is what types.SimpleNamespace is for. -- https://mail.python.org/mailman/listinfo/python-list