Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95245
| Date | 2015-08-11 14:28 +1000 |
|---|---|
| From | Cameron Simpson <cs@zip.com.au> |
| Subject | Re: looking for standard/builtin dict-like data object |
| References | <CAPTjJmoLSZjoerPeJ5a+Nh1ftcQfqgdcF-xB=3Xn7m2WKxyjHA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.64.1439267302.3627.python-list@python.org> (permalink) |
On 11Aug2015 14:09, Chris Angelico <rosuav@gmail.com> wrote: >On Tue, Aug 11, 2015 at 1:40 PM, Cameron Simpson <cs@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! Cheers, Cameron Simpson <cs@zip.com.au> Ed Campbell's <ed@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.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: looking for standard/builtin dict-like data object Cameron Simpson <cs@zip.com.au> - 2015-08-11 14:28 +1000
csiph-web