[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

Jacob Walls report at bugs.python.org
Fri Mar 4 20:24:29 EST 2022


Jacob Walls <jacobtylerwalls at gmail.com> added the comment:

I agree not a bug. To ignore the document default you can set `specified_attributes` on the parser as documented:

https://docs.python.org/3/library/pyexpat.html#xml.parsers.expat.xmlparser.specified_attributes

Also, this was explicitly worked on recently in bpo-42151, so hard to imagine reversing course so soon. I suggest the issue be re-closed.

----------
nosy: +jacobtylerwalls

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46798>
_______________________________________


More information about the Python-bugs-list mailing list