[Python-checkins] python/dist/src/Doc/api concrete.tex,1.53,1.54

perky at users.sourceforge.net perky at users.sourceforge.net
Wed Aug 4 09:39:05 CEST 2004


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

Modified Files:
	concrete.tex 
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: concrete.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** concrete.tex	3 Aug 2004 16:02:35 -0000	1.53
--- concrete.tex	4 Aug 2004 07:38:33 -0000	1.54
***************
*** 895,903 ****
  \end{cfuncdesc}
  
- \begin{cfuncdesc}{int}{Py_UNICODE_ISWIDE}{Py_UNICODE ch}
-   Returns 1/0 depending on whether \var{ch} is a wide or full-width
-   character.
- \end{cfuncdesc}
- 
  These APIs can be used for fast direct character conversions:
  
--- 895,898 ----
***************
*** 958,965 ****
  \end{cfuncdesc}
  
- \begin{cfuncdesc}{int}{PyUnicode_GetWidth}{PyObject *unicode}
-   Return the fixed-width representation length of the Unicode object.
- \end{cfuncdesc}
- 
  \begin{cfuncdesc}{PyObject*}{PyUnicode_FromEncodedObject}{PyObject *obj,
                                                        const char *encoding,
--- 953,956 ----



More information about the Python-checkins mailing list