Steven Bethard wrote: > I've updated the PEP based on a number of comments on comp.lang.python. > The most updated versions are still at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > In this post, I'm especially soliciting review of Carl Banks's point > (now discussed under Open Issues) which asks if it would be better to > have the create statement translated into: > > <name> = <callable>("<name>", *<tuple>, **<namespace>) > > instead of the current: > > <name> = <callable>("<name>", <tuple>, <namespace>) > > The former allows the create statement to be applied to a wider variety > of callables; the latter keeps a better parallel with the class statement.
... > and named, nested hierarchies like XML documents could be created > like:: > > create ETobject html: > "This statement would generate an ElementTree object" > > create ETobject head: > "generate the head" > ... > > create ETobject body: > "generate the body" > ... I think this is is a most important eventual use-case, and would like to see it better worked out - or else declared outside the scope of the proposed statement. As far as I can see, this does not cut it, since xml and html allow /sequencial repetition/ of tags and the results of the statement suites are passed as unordered namespaces/dicts. Cheers, az. -- http://mail.python.org/mailman/listinfo/python-list