[docs] [issue9708] cElementTree iterparse does not support "parser" argument

Silvan Jegen report at bugs.python.org
Fri Nov 25 16:22:09 CET 2011


Silvan Jegen <s.jegen at gmail.com> added the comment:

I changed a few lines in the glue code of the _elementtree.c Module of Python 3.3.0a0 to add support for the "parser" argument. I do have to admit though that I am not familiar with the Python/C-API so this solution may not be ideal (i. e. it may be falling back to the Python implementation of iterparse without me realizing).

Please note that it is not possible to give an ElementTree.XMLParser instance as a parameter to the cElementTree.iterparse function (which may not be desirable in any case) using this patch.

I assume that the patch will be applicable to Python 2.7.x as well, but I did not try it. I can apply/adapt it to Python 2.7.x, if you think that would be useful.

----------
keywords: +patch
nosy: +Shugyousha
Added file: http://bugs.python.org/file23777/issue9708.Python330a0.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9708>
_______________________________________


More information about the docs mailing list