Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!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.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:Python': 0.06; 'python': 0.11; '-tkc': 0.16; 'dump': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'unordered': 0.16; 'world",': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'could': 0.34; 'problem': 0.35; 'controls': 0.36; 'charset:us-ascii': 0.36; 'window': 0.38; 'to:addr:python-list': 0.38; 'previous': 0.38; 'to:addr:python.org': 0.39; 'algorithms': 0.60; 'containing': 0.69; 'bag': 0.74; 'saw': 0.77; 'dict,': 0.84; 'received:50.22': 0.84 Date: Wed, 15 Jan 2014 18:48:39 -0600 From: Tim Chase To: python-list@python.org Subject: Re: Python declarative In-Reply-To: References: <1389805328.32401.6.camel@linux-fetk.site> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389833272 news.xs4all.nl 2847 [2001:888:2000:d::a6]:50042 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64030 On 2014-01-16 10:09, Chris Angelico wrote: > myWindow = Window( > title="Hello World", > children=[Button( > label="I'm a button", > onClick=exit > )] > ) This also solves the problem that **kwargs are just a dict, which is inherently unordered. So with the previous scheme, you'd just get an unordered bag of controls that Python could then dump into your containing window as its dict-traversal algorithms saw fit. :-) -tkc