Jérôme Laurens added the comment:

The totsstring(..., method='text') is not suitable for the inner text because 
it adds the tail of the top element.

A proper implementation would be

def innertext(elt):
    return (elt.text or '') +''.join(innertext(e)+e.tail for e in elt)

that can be included in the doc instead of the mention of the to string trick

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24079>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to