summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-04-13 22:39:12 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-04-13 22:39:12 (GMT)
commitda950eb01c1191e6ccdd02ca009fca7ead2b3066 (patch)
treed2abeb4a7910e4070af885d063b5f91b96cef0a1 /Doc/whatsnew
parent8ffb5734d33db1ec0cc07e135e44e26db95cfd35 (diff)
downloadcpython-da950eb01c1191e6ccdd02ca009fca7ead2b3066.zip
cpython-da950eb01c1191e6ccdd02ca009fca7ead2b3066.tar.gz
cpython-da950eb01c1191e6ccdd02ca009fca7ead2b3066.tar.bz2
Add example
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/2.6.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index b10c48d..ea330bb 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -736,7 +736,13 @@ There's also a ``__future__`` import that causes all string literals
to become Unicode strings. This means that ``\u`` escape sequences
can be used to include Unicode characters.
-XXX give example
+ from __future__ import unicode_literals
+
+ s = ('\u751f\u3080\u304e\u3000\u751f\u3054'
+ '\u3081\u3000\u751f\u305f\u307e\u3054')
+
+ print len(s) # 12 Unicode characters
+
.. seealso::