From 0a052f34fbbacba2012de8b897414302de3fd78c Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 20 Aug 2012 19:46:29 -0400 Subject: [PATCH] Clarify Python 3 stuff. --- README.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 228d2dd..d1eb3b3 100644 --- a/README.rst +++ b/README.rst @@ -29,7 +29,8 @@ Normal usage is rather straightforward (where ``text`` is page text):: >>> wikicode = mwparserfromhell.parse(text) ``wikicode`` is a ``mwparserfromhell.wikicode.Wikicode`` object, which acts -like an ordinary unicode object with some extra methods. For example:: +like an ordinary ``unicode`` object (or ``str`` on Python 3) with some extra +methods. For example:: >>> text = "I has a template! {{foo|bar|baz|eggs=spam}} See it?" >>> wikicode = mwparserfromhell.parse(text) @@ -96,6 +97,8 @@ saving the page!) by calling ``unicode()`` on it:: >>> text == code True +Likewise, in Python 3, use ``str(code)``. + Integration -----------