diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-07 00:31:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-07 00:31:11 (GMT) |
commit | 9ec5e25f26a490510bb5da5c26a276cd30a263a0 (patch) | |
tree | a0eac2557139a2e7f43c753a90993fc0a7894b4e /Modules/clinic | |
parent | f2fdfe1f8859db62e73323f918149f3936e5e0e9 (diff) | |
download | cpython-9ec5e25f26a490510bb5da5c26a276cd30a263a0.zip cpython-9ec5e25f26a490510bb5da5c26a276cd30a263a0.tar.gz cpython-9ec5e25f26a490510bb5da5c26a276cd30a263a0.tar.bz2 |
Issue #25638: Optimized ElementTree.iterparse(); it is now 2x faster.
ElementTree.XMLParser._setevents now accepts any objects with the append
method, not just a list.
Diffstat (limited to 'Modules/clinic')
-rw-r--r-- | Modules/clinic/_elementtree.c.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 86b4c4c..92e98cf 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -668,12 +668,13 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *args) PyObject *events_queue; PyObject *events_to_report = Py_None; - if (!PyArg_ParseTuple(args, "O!|O:_setevents", - &PyList_Type, &events_queue, &events_to_report)) + if (!PyArg_UnpackTuple(args, "_setevents", + 1, 2, + &events_queue, &events_to_report)) goto exit; return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report); exit: return return_value; } -/*[clinic end generated code: output=25b8bf7e7f2151ca input=a9049054013a1b77]*/ +/*[clinic end generated code: output=19d94e2d2726d3aa input=a9049054013a1b77]*/ |