Source formatting for long expressions.
frankm at hiwaay.net
Sun Jun 16 18:20:12 CEST 2002
Michael Gilfix <mgilfix at eecs.tufts.edu> wrote in message news:<mailman.1023816076.400.python-list at python.org>...
> On Tue, Jun 11 @ 10:32, Christopher Armstrong wrote:
> > XML is a terrible format for object persistence, due to the lack of robust
> > mappings. Twisted's XML uses attributes in some cases, but that is only
> > possible when you have string:string mappings. In *any* other case, you
> > have to resort to children nodes, with such ugly syntax as::
> > <instance class="twisted.some.Class">
> > <dictionary>
> > <string role="key" value="someAttr" />
> > <list>
> > <string value="foo" />
> > </list>
> > </dictionary>
> > Compare that with the equivalent AOT format::
> > Instance("twisted.some.Class",
> > someAttr=["foo"],
> > )
> > *That* is why I don't just use XML.
> I'm not disagreeing with you because I don't think you're wrong in
> this case and well, XML isn't for everything. I think XML can work
> here just as well but it's just more work.
> -- Mike
Hi, I'm not arguing the relative merits of using XML for persistance, but
just fyi, if you want a straight XML pickler, check out:
More information about the Python-list