Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libunicodedata.tex @ 21467:4e35fa5d5708 legacy-trunk
Add documentation for the help() built-in; contributed by Ka-Ping Yee.
This is part of SF patch #494622.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Tue, 18 Dec 2001 16:31:08 +0000 |
| parents | 743d52075be5 |
| children | 1885b2d6393a |
| rev | line source |
|---|---|
|
12920
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1 \section{\module{unicodedata} --- |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
2 Unicode Database} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
3 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
4 \declaremodule{standard}{unicodedata} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
5 \modulesynopsis{Access the Unicode Database.} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
6 \moduleauthor{Marc-Andre Lemburg}{mal@lemburg.com} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
7 \sectionauthor{Marc-Andre Lemburg}{mal@lemburg.com} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
8 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
9 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
10 \index{Unicode} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
11 \index{character} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
12 \indexii{Unicode}{database} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
13 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
14 This module provides access to the Unicode Character Database which |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
15 defines character properties for all Unicode characters. The data in |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
16 this database is based on the \file{UnicodeData.txt} file version |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
17 3.0.0 which is publically available from \url{ftp://ftp.unicode.org/}. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
18 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
19 The module uses the same names and symbols as defined by the |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
20 UnicodeData File Format 3.0.0 (see |
|
14623
aaa1dc161ce3
Update URL to unicode.org's FTP site using an HTTP URL to the same
Fred Drake <fdrake@acm.org>
parents:
12920
diff
changeset
|
21 \url{http://www.unicode.org/Public/UNIDATA/UnicodeData.html}). It |
|
12920
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
22 defines the following functions: |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
23 |
|
16203
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
24 \begin{funcdesc}{lookup}{name} |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
25 Look up character by name. If a character with the |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
26 given name is found, return the corresponding Unicode |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
27 character. If not found, \exception{KeyError} is raised. |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
28 \end{funcdesc} |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
29 |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
30 \begin{funcdesc}{name}{unichr\optional{, default}} |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
31 Returns the name assigned to the Unicode character |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
32 \var{unichr} as a string. If no name is defined, |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
33 \var{default} is returned, or, if not given, |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
34 \exception{ValueError} is raised. |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
35 \end{funcdesc} |
|
743d52075be5
new unicodedata functions (name, lookup)
Fredrik Lundh <fredrik@pythonware.com>
parents:
14623
diff
changeset
|
36 |
|
12920
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
37 \begin{funcdesc}{decimal}{unichr\optional{, default}} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
38 Returns the decimal value assigned to the Unicode character |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
39 \var{unichr} as integer. If no such value is defined, |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
40 \var{default} is returned, or, if not given, |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
41 \exception{ValueError} is raised. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
42 \end{funcdesc} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
43 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
44 \begin{funcdesc}{digit}{unichr\optional{, default}} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
45 Returns the digit value assigned to the Unicode character |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
46 \var{unichr} as integer. If no such value is defined, |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
47 \var{default} is returned, or, if not given, |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
48 \exception{ValueError} is raised. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
49 \end{funcdesc} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
50 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
51 \begin{funcdesc}{numeric}{unichr\optional{, default}} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
52 Returns the numeric value assigned to the Unicode character |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
53 \var{unichr} as float. If no such value is defined, \var{default} is |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
54 returned, or, if not given, \exception{ValueError} is raised. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
55 \end{funcdesc} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
56 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
57 \begin{funcdesc}{category}{unichr} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
58 Returns the general category assigned to the Unicode character |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
59 \var{unichr} as string. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
60 \end{funcdesc} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
61 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
62 \begin{funcdesc}{bidirectional}{unichr} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
63 Returns the bidirectional category assigned to the Unicode character |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
64 \var{unichr} as string. If no such value is defined, an empty string |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
65 is returned. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
66 \end{funcdesc} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
67 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
68 \begin{funcdesc}{combining}{unichr} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
69 Returns the canonical combining class assigned to the Unicode |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
70 character \var{unichr} as integer. Returns \code{0} if no combining |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
71 class is defined. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
72 \end{funcdesc} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
73 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
74 \begin{funcdesc}{mirrored}{unichr} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
75 Returns the mirrored property of assigned to the Unicode character |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
76 \var{unichr} as integer. Returns \code{1} if the character has been |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
77 identified as a ``mirrored'' character in bidirectional text, |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
78 \code{0} otherwise. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
79 \end{funcdesc} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
80 |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
81 \begin{funcdesc}{decomposition}{unichr} |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
82 Returns the character decomposition mapping assigned to the Unicode |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
83 character \var{unichr} as string. An empty string is returned in case |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
84 no such mapping is defined. |
|
deaf25df15fe
Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
85 \end{funcdesc} |
