[lxml-dev] Expose _assertHasRoot as part of the API?

Sidnei da Silva sidnei at enfoldsystems.com
Thu Mar 29 16:01:27 CEST 2007


Hi,

I'm facing an issue here, that if applying a XSLT the resulting
document is empty, the only way to check that is to call
_assertHasRoot and catch the AssertionError apparently. Obviously
catching AssertionError's is not very recommended, specially because
they tend to not be raised when running with -O. Can we add a public
API to check if a element tree is empty? Maybe isEmpty()?

-- 
Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214


More information about the lxml-dev mailing list