[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2020-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2020-09-17 Thread Irit Katriel
Irit Katriel added the comment: Should this issue be closed as 'rejected', or is there anything left to do? -- nosy: +iritkatriel ___ Python tracker ___

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2018-05-17 Thread Stefan Behnel
Stefan Behnel added the comment: Sorry, but you are proposing an API extension here that provides no benefits but duplicates existing functionality in a less versatile place. This is not going to happen. The second proposal (str(xml)) is actually not very helpful as it

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2018-05-17 Thread Steven Vascellaro
Steven Vascellaro added the comment: Alternatively, the most intuitive solution would be to give `Element` an explicit `__str__` method. The current behavior of `str(Element)` is to return the object's location in memory. ``` from xml.etree import ElementTree xml =

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2018-05-17 Thread Steven Vascellaro
New submission from Steven Vascellaro : In Python 3.6, converting an xml `xml.etree.ElementTree.Element` to a string is done using `xml.etree.ElementTree.tostring()`. ``` from xml.etree import ElementTree xml = ElementTree.Element('Person', Name='John')