looking for standard/builtin dict-like data object

Cameron Simpson cs at zip.com.au
Tue Aug 11 06:28:07 CEST 2015

On 11Aug2015 14:09, Chris Angelico <rosuav at gmail.com> wrote:
>On Tue, Aug 11, 2015 at 1:40 PM, Cameron Simpson <cs at zip.com.au> wrote:
>> 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!

Cameron Simpson <cs at zip.com.au>

Ed Campbell's <ed at Tekelex.Com> pointers for long trips:
6. *NEVER* trust anyone in a cage, if they weren't nuts they'd be on a
   bike like everyone else.

More information about the Python-list mailing list