[lxml-dev] PATCH: XMLSyntaxError

Andrey Tatarinov elephantum at cyberzoo.ru
Sun Nov 6 14:18:06 CST 2005

On Sun, 2005-11-06 at 20:32 +0100, Stefan Behnel wrote:
> Stefan Behnel wrote:
> > Geert Jansen wrote:
> >> the applied patch reparents two lxml exceptions from SyntaxError to
> >> Error. The advantage is that any lxml error can now be caught by
> >> trapping just lxml.etree.Error. At the moment you need to catch both
> >> lxml.etree.Error and SyntaxError which is a nuisance. Besides that it's
> >> common interface design to have an inheritance hierarchy with a single
> >> root.
> > 
> > +1 for this one. I'll apply it in my branch.
> Now that I think about it: I guess that's for compatibility, too. So if we
> change this, why not take the second step and rename "Error" into
> "LxmlException" ? Would reduce the chance of import conflicts, at least in new
> code. We may still leave Error in for compatibility, but depricate it.

Then what are packages for?

More information about the lxml mailing list