diff options
author | Jeff Hammel <jhammel@mozilla.com> | 2013-12-19 20:15:18 -0800 |
---|---|---|
committer | Jeff Hammel <jhammel@mozilla.com> | 2013-12-19 20:15:18 -0800 |
commit | 0a8736e9c891d68be19138c6effc4b950986705a (patch) | |
tree | 16c10f929affe85d65ba4a7e65e2d3e72b44d82c | |
parent | 265689672878f19a76629f361d5bc31d4cce403d (diff) | |
download | tempita-0a8736e9c891d68be19138c6effc4b950986705a.tar.gz |
more fun
-rw-r--r-- | docs/index.txt | 8 |
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é |