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
diff --git a/Doc/lib/libunicodedata.tex b/Doc/lib/libunicodedata.tex
index a6d9d43..2922913 100644
--- a/Doc/lib/libunicodedata.tex
+++ b/Doc/lib/libunicodedata.tex
@@ -71,6 +71,11 @@
class is defined.
\end{funcdesc}
+\begin{funcdesc}{east_asian_width}{unichr}
+ Returns the east asian width of assigned to the Unicode character
+ \var{unichr} as string.
+\end{funcdesc}
+
\begin{funcdesc}{mirrored}{unichr}
Returns the mirrored property of assigned to the Unicode character
\var{unichr} as integer. Returns \code{1} if the character has been
@@ -123,4 +128,4 @@
The version of the Unicode database used in this module.
\versionadded{2.3}
-\end{datadesc}
\ No newline at end of file
+\end{datadesc}