diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-07-27 18:53:33 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-07-27 18:53:33 (GMT) |
commit | f60eeb1738fa451350558676f38bcd41e99d1b2a (patch) | |
tree | 2d204034ce4c8554db2b3c0dcfc28d35505251cc /Doc | |
parent | 9ad7a60f623cdc9f4a527e3a1570d3266df46205 (diff) | |
download | cpython-f60eeb1738fa451350558676f38bcd41e99d1b2a.zip cpython-f60eeb1738fa451350558676f38bcd41e99d1b2a.tar.gz cpython-f60eeb1738fa451350558676f38bcd41e99d1b2a.tar.bz2 |
Update URL; add example
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libunicodedata.tex | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Doc/lib/libunicodedata.tex b/Doc/lib/libunicodedata.tex index 1998ea8..435466a 100644 --- a/Doc/lib/libunicodedata.tex +++ b/Doc/lib/libunicodedata.tex @@ -18,7 +18,7 @@ this database is based on the \file{UnicodeData.txt} file version The module uses the same names and symbols as defined by the UnicodeData File Format 4.1.0 (see -\url{http://www.unicode.org/Public/4.1-Update/UnicodeData-4.1.0.html}). It +\url{http://www.unicode.org/Public/4.1.0/ucd/UCD.html}). It defines the following functions: \begin{funcdesc}{lookup}{name} @@ -140,3 +140,21 @@ the Unicode database (such as IDNA). \versionadded{2.5} \end{datadesc} +Examples: + +\begin{verbatim} +>>> unicodedata.lookup('LEFT CURLY BRACKET') +u'{' +>>> unicodedata.name(u'/') +'SOLIDUS' +>>> unicodedata.decimal(u'9') +9 +>>> unicodedata.decimal(u'a') +Traceback (most recent call last): + File "<stdin>", line 1, in ? +ValueError: not a decimal +>>> unicodedata.category(u'A') # 'L'etter, 'u'ppercase +'Lu' +>>> unicodedata.bidirectional(u'\u0660') # 'A'rabic, 'N'umber +'AN' +\end{verbatim} |