Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'attributes': 0.07; 'cc:addr:python-list': 0.09; 'pointers': 0.09; '(unlike': 0.16; '*never*': 0.16; '>on': 0.16; 'api,': 0.16; "campbell's": 0.16; 'fly': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'subject:object': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'cheers,': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'chris': 0.26; 'accepts': 0.29; 'arguments,': 0.29; 'subject:/': 0.30; 'everyone': 0.31; 'anyone': 0.32; "can't": 0.32; 'class': 0.33; 'received:com.au': 0.33; 'subject:like': 0.33; 'thanks!': 0.34; 'tue,': 0.34; 'but': 0.36; 'keyword': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'thought': 0.37; 'charset:us-ascii': 0.37; 'does': 0.39; 'subject:-': 0.39; 'some': 0.40; 'more': 0.63; 'cameron': 0.66; 'else.': 0.66; "they'd": 0.84; 'subject:looking': 0.91 Date: Tue, 11 Aug 2015 14:28:07 +1000 From: Cameron Simpson To: Chris Angelico Cc: "python-list@python.org" Subject: Re: looking for standard/builtin dict-like data object MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) References: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=7VRakydLWw4CnqwyGz1TSg==:117 a=7VRakydLWw4CnqwyGz1TSg==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=vrnE16BAAAAA:8 a=yEdEr6MRgwAA:10 a=kj9zAlcOel0A:10 a=uRRa74qj2VoA:10 a=pGLkceISAAAA:8 a=AmoI6y9CAAAA:8 a=MK8nDvDYH8n2qeGSm7UA:9 a=CjuIK1q_8ugA:10 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1439267302 news.xs4all.nl 2879 [2001:888:2000:d::a6]:37763 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95245 On 11Aug2015 14:09, Chris Angelico wrote: >On Tue, Aug 11, 2015 at 1:40 PM, Cameron Simpson 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 Ed Campbell's 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.