summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorscoder <stefan_ml@behnel.de>2016-12-04 08:31:44 +0100
committerGitHub <noreply@github.com>2016-12-04 08:31:44 +0100
commitb6e549e929b216ec4d9df4d905f42a4a009fbc2a (patch)
treee1f51d88d40c99ab84509d1fc72afbadc2589c72 /doc
parent5efbc4962833800818d0af8e2ee077e4eff73af8 (diff)
parentea2e8bf5dbb92b82916c0a8aed92aed4a1e9aa38 (diff)
downloadpython-lxml-b6e549e929b216ec4d9df4d905f42a4a009fbc2a.tar.gz
Merge pull request #214 from sam-m888/patch-4
Tutorial: Import BytesIO and mark text as bytes
Diffstat (limited to 'doc')
-rw-r--r--doc/tutorial.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/tutorial.txt b/doc/tutorial.txt
index 54ff7c24..7d7a2ff6 100644
--- a/doc/tutorial.txt
+++ b/doc/tutorial.txt
@@ -822,7 +822,8 @@ doing this all together and use the string parsing functions above.
.. sourcecode:: pycon
- >>> some_file_like_object = BytesIO("<root>data</root>")
+ >>> from io import BytesIO
+ >>> some_file_like_object = BytesIO(b"<root>data</root>")
>>> tree = etree.parse(some_file_like_object)