[issue34160] ElementTree not preserving attribute order

2018-12-19 Thread Julian Sivertsen


Julian Sivertsen  added the comment:

I don't understand why this library should go out of its way to support the old 
behavior when it seems like the only thing it breaks is tests that assume 
something that was never guaranteed and where you can get the old behavior in 
just two lines of Python:

for node in root.iter():
node.attrib = dict(sorted(node.items()))

Kind regards from confused Pythoner that just wonted the attribute order to 
make sense

--
nosy: +sivert

___
Python tracker 
<https://bugs.python.org/issue34160>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2015-07-12 Thread Julian Sivertsen

Julian Sivertsen added the comment:

I bumped into a similar issue with mimetypes.guess_extension on Arch Linux 
64-bit in February.  The behavior is still present in python 3.4.3.

$ python test.py
.htm
$ python test.py
.html
$ cat test.py
from mimetypes import guess_extension

print(guess_extension('text/html'))
$ python
Python 3.4.3 (default, Mar 25 2015, 17:13:50)
[GCC 4.9.2 20150304 (prerelease)] on linux
Type help, copyright, credits or license for more information.


--
nosy: +sivert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4963
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com