gh-155742: Remove dead code in _elementtree - #157342
Conversation
Add tests on TreeBuilder.data().
|
@serhiy-storchaka: Should we modify data() to raise TypeError if the argument is not a string? Calling TreeBuilder.data() with a bytes object fails on TreeBuilder.close() call with the Python implementation, but it doesn't fail with the C implementation. Calling TreeBuilder.data() twice with a bytes object fails on TreeBuilder.close() with the Python implementation, but it only fails later when reading the TreeBuilder.data() documentation says:
But it doesn't raise a Modifying data() to raise a An alternative is to only remove the |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
This is a part of Python 2 leftover. I created a separate issue for this (#157366) and a more complete PR.
|
@serhiy-storchaka wrote a more complete PR than mine: PR gh-157367. I close my PR. |
Add tests on TreeBuilder.data().