Skip to content

Commit

Permalink
[svn r3698] r4256@delle: sbehnel | 2008-05-21 00:07:07 +0200
Browse files Browse the repository at this point in the history
 Py3 fixes

--HG--
branch : trunk
  • Loading branch information
scoder committed May 21, 2008
1 parent a768ed8 commit 63022e8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion doc/parsing.txt
Expand Up @@ -29,7 +29,17 @@ The usual setup procedure:
.. sourcecode:: pycon

>>> from lxml import etree
>>> from StringIO import StringIO

..
>>> try: from StringIO import StringIO
... except ImportError:
... from io import BytesIO
... def StringIO(s):
... if isinstance(s, str): s = s.encode("UTF-8")
... return BytesIO(s)

>>> try: unicode = __builtins__["unicode"]
... except NameError: unicode = str


Parsers
Expand Down

0 comments on commit 63022e8

Please sign in to comment.