On Tue, 9 Sep 2025 15:27:39 +0200 Stefan Behnel via lxml - The Python XML Toolkit <lxml@python.org> wrote:
Schimon Jehudah schrieb am 09.09.25 um 13:16:
On Tue, 9 Sep 2025 08:50:41 +0200 Stefan Behnel via lxml - The Python XML Toolkit <lxml@python.org> wrote:
xml_data_bytes = memoryview(newdom) xml_data_str = str(xml_data_bytes, 'UTF-8')
Did you mean to write.
xml_data_bytes = memoryview(newdom).tobytes() xml_data_str = str(xml_data_bytes, 'UTF-8') No, that would force Python to create two intermediate copies of the bytes data. One is enough.
Corrected. https://git.xmpp-it.net/sch/Rivista/commit/b49c6ce24a6cad2d2b5a6ecb14321eb66... Thank you very much. Stefan, please kindly provide useful (i.e. promotional) text about project LXML to attach to the file README of project Rivista. I deem LXML to be a very important project which is worthy to promote. Schimon