summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/index.txt b/docs/index.txt
index 092cebf..6d943f6 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -121,10 +121,12 @@ attribute. It will try to use that encoding whenever ``unicode`` and
>>> tmpl = tempita.Template(u'Hi {{name}}')
>>> import sys
>>> if sys.version.startswith('2'): # unicode is the default in 3 -> failing test
- ... print (tmpl.substitute(name='Jos\xc3\xa9'))
+ ... val = tmpl.substitute(name='Jos\xc3\xa9')
+ ... comparison = val == u'Hi Jos\xe9'
... else:
- ... print ('Hi José') # to satisfy doctest
- Hi José
+ ... comparison = True
+ >>> comparison
+ True
>>> tmpl = tempita.Template('Hi {{name}}')
>>> print (tmpl.substitute(name=u'Jos\xe9'))
Hi José