mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Two changes that are definitely problem-free and avoid calling print()
with a bytes instance (as this will soon print something differently).
This commit is contained in:
parent
c5724deb1a
commit
b62e8a8062
2 changed files with 4 additions and 6 deletions
|
@ -183,9 +183,8 @@ def parseliteral():
|
|||
<html><body>text</body></html>
|
||||
>>> print(ET.tostring(element))
|
||||
<html><body>text</body></html>
|
||||
>>> print(ET.tostring(element, "ascii"))
|
||||
<?xml version='1.0' encoding='ascii'?>
|
||||
<html><body>text</body></html>
|
||||
>>> print(repr(ET.tostring(element, "ascii")))
|
||||
b'<?xml version=\'1.0\' encoding=\'ascii\'?>\n<html><body>text</body></html>'
|
||||
>>> _, ids = ET.XMLID("<html><body>text</body></html>")
|
||||
>>> len(ids)
|
||||
0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue