>>> I also thought the stdlib had some kind of "namespace" class with this >>> kind >>> of API, but I can't find it now:-( >> >> >> It does - types.SimpleNamespace(). It accepts keyword arguments, and >> will let you create more attributes on the fly (unlike a namedtuple). > > > Yes, that's it. Thanks! >
Ah, sad, sad, sad. We unfortunately stuck with built-in Python 2.6.x in our system. I see from docs that SimpleNamespace is rather new creation (3.3+). I know 'namedtuple' way, but don't like it as I prefer freedom in attribute creation/mutation. Looks like I have to stuck with handmade solution for now. Anyway - thanks a lot for everybody! Vladimir https://itunes.apple.com/us/app/python-code-samples/id1025613117 -- https://mail.python.org/mailman/listinfo/python-list