6 Aug
2006
6 Aug
'06
5:18 p.m.
On 8/6/06, Fred Drake
On 8/6/06, Stefan Behnel
wrote: class LxmlSyntaxError(LxmlError, SyntaxError): pass
Is that the built-in SyntaxError? Leave that out. It's really only intended to be used with Python-language syntax errors. Handling for any other syntax errors should use separate exceptions specific to the processing for that language.
I think that elementtree and cElementTree do the same thing. I don't like this behavior at all, though -- I spent quite awhile trying to find a syntax error in my code a couple days ago when the real error was in the XML input. --Andy