[Python-ideas] Make-statement [Re: Different interface for namedtuple?]
bruce at leapyear.org
Mon Mar 7 09:20:37 CET 2011
On Sun, Mar 6, 2011 at 11:24 PM, Raymond Hettinger <
raymond.hettinger at gmail.com> wrote:
> On Mar 6, 2011, at 10:06 PM, Bruce Leban wrote:
> . Personally, the xml writer seems like a reasonable use to me.
> I'm surprised that you like the XML writer. To me it seems much more
> awkward to type the python code than the XML it generates:
> At least in this example, it seems to me that the XML writer created more
> work and more complexity than it saved.
I agree for this example. In real code, it wouldn't all be static. It would
for a in stuff:
I like that better than something like this:
x.write(x.element('foo', [x.element('bar', a.render()) for a in stuff]))
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas