[Python-Dev] Assertions

Andrew Kuchling akuchlin@mems-exchange.org
Wed, 22 Nov 2000 10:32:45 -0500

On Tue, Nov 21, 2000 at 10:33:03PM -0800, Greg Stein wrote:
>If somebody wants an exception-conforming DOM implementation with all the
>bells and whistles, then they can go elsewhere. If minidom starts getting
>loaded up, then it has kind of defeated its purpose, no?

Checking for the correct children should be quite fast; in PyDOM it
was basically the line "if newnode.type not in
self._LEGAL_CHILDREN_TYPES: raise ...".  I don't know about the other
minidom bug report, but will try to look into it before too long.


   Some compilers allow a check during execution that subscripts do not
   exceed array dimensions. This is a help, but not sufficient. First,
   many programmers do not use such compilers because "They're not
   efficient." (Presumably, this means that it is vital to get the wrong
   answers quickly.)
   Kernighan and Plauger, in _The Elements of Programming Style_