summaryrefslogtreecommitdiff
path: root/docs/index.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/index.txt')
-rw-r--r--docs/index.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/index.txt b/docs/index.txt
index 2d9b95c..cb6aeb9 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -119,7 +119,11 @@ attribute. It will try to use that encoding whenever ``unicode`` and
``str`` objects are mixed in the template. E.g.::
>>> tmpl = tempita.Template(u'Hi {{name}}')
- >>> print (tmpl.substitute(name='Jos\xc3\xa9'))
+ >>> import sys
+ >>> if sys.version.startswith('2'): # unicode is the default in 3 -> failing test
+ ... print (tmpl.substitute(name='Jos\xc3\xa9'))
+ ... else:
+ ... print ('Hi José') # to satisfy doctest
Hi José
>>> tmpl = tempita.Template('Hi {{name}}')
>>> print (tmpl.substitute(name=u'Jos\xe9'))