commit | 5598cc90c745dab827e55fadded42dbe85e31d33 | [log] [tgz] |
---|---|---|
author | Diego Rojas <rojastorrado@gmail.com> | Wed Nov 07 09:09:04 2018 -0500 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Wed Nov 07 16:09:04 2018 +0200 |
tree | 9bda930fd528affec3133a00711a069153f71fd2 | |
parent | f19447994983902aa88362d8fffe645f1ea2f2aa [diff] |
bpo-34160: Preserve order of attributes in minidom. (GH-10219)
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index e44e04a..469c517 100644 --- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py
@@ -854,9 +854,8 @@ writer.write(indent+"<" + self.tagName) attrs = self._get_attributes() - a_names = sorted(attrs.keys()) - for a_name in a_names: + for a_name in attrs.keys(): writer.write(" %s=\"" % a_name) _write_data(writer, attrs[a_name].value) writer.write("\"")