[Doc-SIG] Error in pyexpat docs

Fred L. Drake, Jr. fdrake@acm.org
Tue, 9 Jul 2002 12:16:03 -0400


[Cleaning out some old email...]

On 29 Oct 2000, uche.ogbuji@fourthought.com wrote:
 > It turns out that ParseFile actually returns 0 on error, returning
 > 1 otherwise.
 > 
 > The first matter is that the code and the docs need to be
 > reconciled.  However, I would _much_ rather prefer that things were
 > as in the docs.  I think ParseFile should raise an exception rather
 > than return an error flag.  Interestingly enough, this is the same
 > argument I had with a colleague just last week.

The return value for ParseFile has just recently been made to do the
right thing in all cases, and now matches Parse.  An exception is
raised when there's an error in parsing, and the exception instance
carries the "code", "offset", and "lineno" attributes.

Just in case anyone thought this was still a problem.  ;-)


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation