[Python-Dev] Assertions

Fred L. Drake, Jr. fdrake@acm.org
Wed, 22 Nov 2000 00:33:38 -0500 (EST)


Paul Prescod writes:
 > I note that minidom will not always give you an exception for a poorly
 > formed tree. That means that the programmer may not find her error until
 > the XML is "out of Python's hands." It should give an exception sooner
 > or later but not never.

  I'd like to mention again that there's also a matter of compliance
with the specification.  The DOM level 1 recommendation includes
specific documentation about the exceptions that are raised in certain
conditions.  Perhaps we should "map" these to more Pythonic
exceptions, and perhaps not, but I think the exceptions should be
raised when the API specification says they will be.  This is an
important aspect of compliance, and the XML community has demonstrated
substantially more interest in standards compliance than the HTML
community ever did; we should reap the benefits and not end up having
Python discarded because the standard implementation isn't compliant.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations