[Python-checkins] r62334 - python/trunk/Doc/whatsnew/2.6.rst

andrew.kuchling python-checkins at python.org
Mon Apr 14 00:39:12 CEST 2008


Author: andrew.kuchling
Date: Mon Apr 14 00:39:12 2008
New Revision: 62334
Log:
Add example
Modified:
 python/trunk/Doc/whatsnew/2.6.rst
Modified: python/trunk/Doc/whatsnew/2.6.rst
==============================================================================
--- python/trunk/Doc/whatsnew/2.6.rst	(original)
+++ python/trunk/Doc/whatsnew/2.6.rst	Mon Apr 14 00:39:12 2008
@@ -736,7 +736,13 @@
 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::
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /