Author martin.panter
Recipients martin.panter, zimeon
Date 2015-09-18.02:39:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1442543981.41.0.968158547051.issue25047@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a patch which changes the code to respect the letter case specified by the user, although it still compares the special strings "unicode", "us-ascii", and "utf-8" case-insensitively, and the default encoding is still lowercase. Let me know what you think.

>>> tree = ElementTree(Element('hello', {'beer': 'good'}))
>>> tree.write(stdout.buffer, encoding="UTF-8", xml_declaration=True); print()
<?xml version='1.0' encoding='UTF-8'?>
<hello beer="good" />
>>> tree.write(stdout.buffer, encoding="UTF-8"); print()
<hello beer="good" />
>>> tree.write(stdout.buffer, xml_declaration=True); print()
<?xml version='1.0' encoding='us-ascii'?>
<hello beer="good" />
History
Date User Action Args
2015-09-18 02:39:41martin.pantersetrecipients: + martin.panter, zimeon
2015-09-18 02:39:41martin.pantersetmessageid: <1442543981.41.0.968158547051.issue25047@psf.upfronthosting.co.za>
2015-09-18 02:39:41martin.panterlinkissue25047 messages
2015-09-18 02:39:41martin.pantercreate