Comment 7 for bug 1284809

Revision history for this message
scoder (scoder) wrote : Re: [Bug 1284809] Re: Doc: In lxml.html.tostring() encoding "unicode" for Python 3

> I tried encoding=str and it worked well.

Yes, and the lack of readability there is exactly the reason why the usage
pattern changed to encoding="unicode" (i.e. a string name) back when Py3
came up. The fact that the old way still works is purely for backwards
compatibility in Py2.