Kaydet (Commit) b62e8a80 authored tarafından Guido van Rossum's avatar Guido van Rossum

Two changes that are definitely problem-free and avoid calling print()

with a bytes instance (as this will soon print something differently).
üst c5724deb
......@@ -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
......
......@@ -175,9 +175,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment