[Twisted-Python] feature request for microdom
glyph at twistedmatrix.com
Wed Sep 25 22:15:55 EDT 2002
On Wed, 25 Sep 2002 21:28:16 -0400, Bob Ippolito <bob at redivi.com> wrote:
> Not all xml comes from files, or has more than one line.. often with
> over-network or mostly-human-unreadable-anyways xml you'll strip all
> the whitespace, because you can always parse it and "toprettyxml()" it
> if you need later on.
It may be useful, then, to say that the Element either (A) has a file/line #,
(B) came from a network stream at a particular point, or (C) was created
dynamically and has no file/line position yet.
> You only really want line numbers and stuff if it doesn't parse when
> you throw the exception
Eh... Debugging info is always helpful, especially in DOMstuff where you're
post-processing templated nodes and you want to know which are which.
> On Wednesday, September 25, 2002, at 08:11 PM, Bruce Mitchener wrote:
> > Hey DOMmies,
> > Well, since we're using MicroDOM .. we might as well make it kick some
> > more ass. :)
Indeed! I want it to have really good error reporting, since that's the one
thing that minidom most sorely lacked when I was playing with it.
> > In working with the Woven stuff, one thing that would help a lot in
> > the formatted failure pages is if the __repr__ of the objects wasn't
> > just this:
> > <twisted.web.microdom.Element instance at 0x83a76dc>
> > but maybe included other information about the element. The best
> > would be to include the name of the file, the line number, the tag
> > name and any attributes. :) But that might be asking for too much.
Hmm. It might be overkill to include all that stuff, but I'll write a __repr__
that does. If, in practice, it turns out to be an overbearing amount of
information, we'll scale it back.
| <`'> | Glyph Lefkowitz: Traveling Sorcerer |
| < _/ > | Lead Developer, the Twisted project |
| < ___/ > | http://www.twistedmatrix.com |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20020925/2bf4466e/attachment.pgp
More information about the Twisted-Python