mirror of
https://github.com/python/cpython.git
synced 2025-08-11 12:29:34 +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>
|
<html><body>text</body></html>
|
||||||
>>> print(ET.tostring(element))
|
>>> print(ET.tostring(element))
|
||||||
<html><body>text</body></html>
|
<html><body>text</body></html>
|
||||||
>>> print(ET.tostring(element, "ascii"))
|
>>> print(repr(ET.tostring(element, "ascii")))
|
||||||
<?xml version='1.0' encoding='ascii'?>
|
b'<?xml version=\'1.0\' encoding=\'ascii\'?>\n<html><body>text</body></html>'
|
||||||
<html><body>text</body></html>
|
|
||||||
>>> _, ids = ET.XMLID("<html><body>text</body></html>")
|
>>> _, ids = ET.XMLID("<html><body>text</body></html>")
|
||||||
>>> len(ids)
|
>>> len(ids)
|
||||||
0
|
0
|
||||||
|
|
|
@ -175,9 +175,8 @@ def parseliteral():
|
||||||
<html><body>text</body></html>
|
<html><body>text</body></html>
|
||||||
>>> print(ET.tostring(element))
|
>>> print(ET.tostring(element))
|
||||||
<html><body>text</body></html>
|
<html><body>text</body></html>
|
||||||
>>> print(ET.tostring(element, "ascii"))
|
>>> print(repr(ET.tostring(element, "ascii")))
|
||||||
<?xml version='1.0' encoding='ascii'?>
|
b'<?xml version=\'1.0\' encoding=\'ascii\'?>\n<html><body>text</body></html>'
|
||||||
<html><body>text</body></html>
|
|
||||||
>>> _, ids = ET.XMLID("<html><body>text</body></html>")
|
>>> _, ids = ET.XMLID("<html><body>text</body></html>")
|
||||||
>>> len(ids)
|
>>> len(ids)
|
||||||
0
|
0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue