[New-bugs-announce] [issue16849] Element.{get, iter} doesn't handle keyword arguments when using _elementtree C accelerator.

Franck Michea report at bugs.python.org
Thu Jan 3 13:36:42 CET 2013


New submission from Franck Michea:

Documentation:
 - http://docs.python.org/3.3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.get
 - http://docs.python.org/3.3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iter

These two functions are documented with keyword arguments. Python implementation works correctly, but as of 3.3, _etreeelement module in C is hot-patching this module to enhance speed. C implementation only expects normal arguments for get and iter. This is what this patch fixes.

First patch so:
 - I am not sure about the "key" string in kwlist array, I followed code above and it doesn't work without it, so I guess it's to for the normal arg.
 - I am not sure about how to test iter with this. tag argument is never used.
 - Included a test that shows the problem.

Have a nice day,

----------
components: Library (Lib), XML
files: etree.patch
keywords: patch
messages: 178939
nosy: kushou
priority: normal
severity: normal
status: open
title: Element.{get,iter} doesn't handle keyword arguments when using _elementtree C accelerator.
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file28541/etree.patch

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


More information about the New-bugs-announce mailing list