[New-bugs-announce] [issue34160] ElementTree not preserving attribute order

Raymond Hettinger report at bugs.python.org
Thu Jul 19 20:42:07 EDT 2018


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

Starting with Python3.6, the order of keyword arguments has been guaranteed.  Something in ElementTree is not respecting that order.

    $ python3.7
    Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24)
    [Clang 6.0 (clang-600.0.57)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from xml.etree.ElementTree import Element, dump
    >>> dump(Element('cirriculum', status='public', company='example'))
    <cirriculum company="example" status="public" />
    >>> #         ^-----------------^-------------------- These are swapped

----------
components: Library (Lib)
messages: 321973
nosy: eli.bendersky, rhettinger, scoder
priority: normal
severity: normal
status: open
title: ElementTree not preserving attribute order
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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


More information about the New-bugs-announce mailing list