Staging
v0.5.1
https://github.com/python/cpython
Revision e9ddfbb41207328d5c89061067f3431e00711fda authored by Hye-Shik Chang on 04 August 2004, 07:38:35 UTC, committed by Hye-Shik Chang on 04 August 2004, 07:38:35 UTC
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
1 parent b5047fd
History
Tip revision: e9ddfbb41207328d5c89061067f3431e00711fda authored by Hye-Shik Chang on 04 August 2004, 07:38:35 UTC
SF #989185: Drop unicode.iswide() and unicode.width() and add
Tip revision: e9ddfbb
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 109 bytes
.hgtags -rw-r--r-- 2.2 KB
LICENSE -rw-r--r-- 12.9 KB
Makefile.pre.in -rw-r--r-- 31.6 KB
README -rw-r--r-- 48.3 KB
aclocal.m4 -rw-r--r-- 2.1 KB
configure -rwxr-xr-x 509.4 KB
configure.in -rw-r--r-- 84.1 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 23.5 KB
setup.py -rw-r--r-- 51.9 KB

README

back to top