diff Doc/lib/libstdtypes.tex @ 32951:024ff0ab4588 legacy-trunk

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
author Hye-Shik Chang <hyeshik@gmail.com>
date Wed, 04 Aug 2004 07:38:35 +0000
parents 46e0431c9701
children fb6ffd290cfb
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex	Wed Aug 04 06:33:51 2004 +0000
+++ b/Doc/lib/libstdtypes.tex	Wed Aug 04 07:38:35 2004 +0000
@@ -664,12 +664,6 @@
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{iswide}{}
-Return true if all characters in the string are wide or full width and
-there is at least one wide or full width character, false otherwise.
-This method is supported by unicode type only.
-\end{methoddesc}
-
 \begin{methoddesc}[string]{join}{seq}
 Return a string which is the concatenation of the strings in the
 sequence \var{seq}.  The separator between elements is the string
@@ -810,11 +804,6 @@
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{width}{}
-Return length of fixed-width representation of the string. This method
-is supported by unicode type only.
-\end{methoddesc}
-
 \begin{methoddesc}[string]{zfill}{width}
 Return the numeric string left filled with zeros in a string
 of length \var{width}. The original string is returned if