From 0a8736e9c891d68be19138c6effc4b950986705a Mon Sep 17 00:00:00 2001 From: Jeff Hammel Date: Thu, 19 Dec 2013 20:15:18 -0800 Subject: more fun --- docs/index.txt | 8 +++++--- 1 file 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é -- cgit v1.2.1