Source formatting for long expressions.

Frank McIngvale frankm at hiwaay.net
Sun Jun 16 12:20:12 EDT 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:

http://www.gnosis.cx/download/Gnosis_Utils-current.tar.gz
http://freshmeat.net/projects/gnosisxml/

frank



More information about the Python-list mailing list