STINNER Victor added the comment:

> The question is if all parser provide a close() method?

It seems like xml.sax supports pluggable parsers, at least using the 
PY_SAX_PARSER environment variable. So it would be safer to add a cheap "if 
hasattr(parser, 'close'):" test;

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30264>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to