On Tue, 9 Sep 2025 15:27:39 +0200
Stefan Behnel via lxml - The Python XML Toolkit <[email protected]> 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 <[email protected]>
> > 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/b49c6ce24a6cad2d2b5a6ecb14321eb663f35ab9

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
_______________________________________________
lxml - The Python XML Toolkit mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/lxml.python.org
Member address: [email protected]

Reply via email to