Python declarative

Tim Chase python.list at tim.thechases.com
Wed Jan 15 19:48:39 EST 2014


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


 



More information about the Python-list mailing list