[Python-checkins] python/dist/src/Misc NEWS,1.1067,1.1068

perky at users.sourceforge.net perky at users.sourceforge.net
Wed Aug 4 09:38:36 CEST 2004


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1744/Misc

Modified Files:
	NEWS 
Log Message:
SF #989185: Drop unicode.iswide() and unicode.width() and add
unicodedata.east_asian_width().  You can still implement your own
simple width() function using it like this:
    def width(u):
        w = 0
        for c in unicodedata.normalize('NFC', u):
            cwidth = unicodedata.east_asian_width(c)
            if cwidth in ('W', 'F'): w += 2
            else: w += 1
        return w


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.1067
retrieving revision 1.1068
diff -C2 -d -r1.1067 -r1.1068
*** NEWS	4 Aug 2004 06:33:50 -0000	1.1067
--- NEWS	4 Aug 2004 07:38:34 -0000	1.1068
***************
*** 68,71 ****
--- 68,74 ----
    and str.is* methods can now work correctly with UTF-8 locales.
  
+ - unicode.iswide() and unicode.width() is dropped and the East Asian
+   Width support is moved to unicodedata extension module.
+ 
  Extension modules
  -----------------



More information about the Python-checkins mailing list