annotate Doc/lib/libtypes.tex @ 25838:8540887bcec6 2.2

Backport of 2.183: Fix memory leak in add_subclass() found by NealN with valgrind.
author Guido van Rossum <guido@python.org>
date Fri, 18 Oct 2002 13:42:21 +0000
parents 7ab8c3811723
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8918
acfffe14628e New section header style.
Fred Drake <fdrake@acm.org>
parents: 8733
diff changeset
1 \section{\module{types} ---
12223
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
2 Names for all built-in types}
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
3
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
4 \declaremodule{standard}{types}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
5 \modulesynopsis{Names for all built-in types.}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
6
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
7
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
8 This module defines names for all object types that are used by the
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
9 standard Python interpreter, but not for the types defined by various
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
10 extension modules. It is safe to use \samp{from types import *} ---
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
11 the module does not export any names besides the ones listed here.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
12 New names exported by future versions of this module will all end in
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
13 \samp{Type}.
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
14
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
15 Typical use is for functions that do different things depending on
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
16 their argument types, like the following:
7695
1ced03671574 Markup nits.
Fred Drake <fdrake@acm.org>
parents: 7633
diff changeset
17
7277
bf4e790bd61a Remove all \bcode / \ecode cruft; this is no longer needed. See previous
Fred Drake <fdrake@acm.org>
parents: 7221
diff changeset
18 \begin{verbatim}
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
19 from types import *
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
20 def delete(list, item):
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
21 if type(item) is IntType:
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
22 del list[item]
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
23 else:
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
24 list.remove(item)
7277
bf4e790bd61a Remove all \bcode / \ecode cruft; this is no longer needed. See previous
Fred Drake <fdrake@acm.org>
parents: 7221
diff changeset
25 \end{verbatim}
7695
1ced03671574 Markup nits.
Fred Drake <fdrake@acm.org>
parents: 7633
diff changeset
26
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
27 The module defines the following names:
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
28
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
29 \begin{datadesc}{NoneType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
30 The type of \code{None}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
31 \end{datadesc}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
32
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
33 \begin{datadesc}{TypeType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
34 The type of type objects (such as returned by
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
35 \function{type()}\bifuncindex{type}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
36 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
37
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
38 \begin{datadesc}{IntType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
39 The type of integers (e.g. \code{1}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
40 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
41
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
42 \begin{datadesc}{LongType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
43 The type of long integers (e.g. \code{1L}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
44 \end{datadesc}
5674
e5de707300e1 Added complex numbers (AMK).
Guido van Rossum <guido@python.org>
parents: 5660
diff changeset
45
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
46 \begin{datadesc}{FloatType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
47 The type of floating point numbers (e.g. \code{1.0}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
48 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
49
8733
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
50 \begin{datadesc}{ComplexType}
23492
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
51 The type of complex numbers (e.g. \code{1.0j}). This is not defined
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
52 if Python was built without complex number support.
8733
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
53 \end{datadesc}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
54
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
55 \begin{datadesc}{StringType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
56 The type of character strings (e.g. \code{'Spam'}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
57 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
58
12272
0ac40e47bdb5 Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents: 12223
diff changeset
59 \begin{datadesc}{UnicodeType}
23492
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
60 The type of Unicode character strings (e.g. \code{u'Spam'}). This is
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
61 not defined if Python was built without Unicode support.
12272
0ac40e47bdb5 Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents: 12223
diff changeset
62 \end{datadesc}
0ac40e47bdb5 Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents: 12223
diff changeset
63
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
64 \begin{datadesc}{TupleType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
65 The type of tuples (e.g. \code{(1, 2, 3, 'Spam')}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
66 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
67
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
68 \begin{datadesc}{ListType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
69 The type of lists (e.g. \code{[0, 1, 2, 3]}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
70 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
71
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
72 \begin{datadesc}{DictType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
73 The type of dictionaries (e.g. \code{\{'Bacon': 1, 'Ham': 0\}}).
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
74 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
75
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
76 \begin{datadesc}{DictionaryType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
77 An alternate name for \code{DictType}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
78 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
79
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
80 \begin{datadesc}{FunctionType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
81 The type of user-defined functions and lambdas.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
82 \end{datadesc}
7831
1f8f2002bfb9 Several minor markup nits.
Fred Drake <fdrake@acm.org>
parents: 7768
diff changeset
83
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
84 \begin{datadesc}{LambdaType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
85 An alternate name for \code{FunctionType}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
86 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
87
18273
9e326c9e6be5 Teach the types module about generators. Thanks to James Althoff on the
Tim Peters <tim.peters@gmail.com>
parents: 12272
diff changeset
88 \begin{datadesc}{GeneratorType}
9e326c9e6be5 Teach the types module about generators. Thanks to James Althoff on the
Tim Peters <tim.peters@gmail.com>
parents: 12272
diff changeset
89 The type of generator-iterator objects, produced by calling a
9e326c9e6be5 Teach the types module about generators. Thanks to James Althoff on the
Tim Peters <tim.peters@gmail.com>
parents: 12272
diff changeset
90 generator function.
9e326c9e6be5 Teach the types module about generators. Thanks to James Althoff on the
Tim Peters <tim.peters@gmail.com>
parents: 12272
diff changeset
91 \versionadded{2.2}
9e326c9e6be5 Teach the types module about generators. Thanks to James Althoff on the
Tim Peters <tim.peters@gmail.com>
parents: 12272
diff changeset
92 \end{datadesc}
9e326c9e6be5 Teach the types module about generators. Thanks to James Althoff on the
Tim Peters <tim.peters@gmail.com>
parents: 12272
diff changeset
93
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
94 \begin{datadesc}{CodeType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
95 The type for code objects such as returned by
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
96 \function{compile()}\bifuncindex{compile}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
97 \end{datadesc}
2488
80729aff9057 added code objects
Guido van Rossum <guido@python.org>
parents: 2064
diff changeset
98
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
99 \begin{datadesc}{ClassType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
100 The type of user-defined classes.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
101 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
102
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
103 \begin{datadesc}{InstanceType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
104 The type of instances of user-defined classes.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
105 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
106
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
107 \begin{datadesc}{MethodType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
108 The type of methods of user-defined class instances.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
109 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
110
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
111 \begin{datadesc}{UnboundMethodType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
112 An alternate name for \code{MethodType}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
113 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
114
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
115 \begin{datadesc}{BuiltinFunctionType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
116 The type of built-in functions like \function{len()} or
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
117 \function{sys.exit()}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
118 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
119
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
120 \begin{datadesc}{BuiltinMethodType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
121 An alternate name for \code{BuiltinFunction}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
122 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
123
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
124 \begin{datadesc}{ModuleType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
125 The type of modules.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
126 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
127
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
128 \begin{datadesc}{FileType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
129 The type of open file objects such as \code{sys.stdout}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
130 \end{datadesc}
7291
b7f84d179e51 Minor stuff:
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
131
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
132 \begin{datadesc}{XRangeType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
133 The type of range objects returned by
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
134 \function{xrange()}\bifuncindex{xrange}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
135 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
136
8733
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
137 \begin{datadesc}{SliceType}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
138 The type of objects returned by
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
139 \function{slice()}\bifuncindex{slice}.
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
140 \end{datadesc}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
141
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
142 \begin{datadesc}{EllipsisType}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
143 The type of \code{Ellipsis}.
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
144 \end{datadesc}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
145
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
146 \begin{datadesc}{TracebackType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
147 The type of traceback objects such as found in
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
148 \code{sys.exc_traceback}.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
149 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
150
8732
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
151 \begin{datadesc}{FrameType}
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
152 The type of frame objects such as found in \code{tb.tb_frame} if
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
153 \code{tb} is a traceback object.
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
154 \end{datadesc}
12223
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
155
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
156 \begin{datadesc}{BufferType}
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
157 The type of buffer objects created by the
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
158 \function{buffer()}\bifuncindex{buffer} function.
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
159 \end{datadesc}
20178
01a5c43f1894 added description of StringTypes object
Skip Montanaro <skip@pobox.com>
parents: 18273
diff changeset
160
01a5c43f1894 added description of StringTypes object
Skip Montanaro <skip@pobox.com>
parents: 18273
diff changeset
161 \begin{datadesc}{StringTypes}
23492
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
162 A sequence containing \code{StringType} and \code{UnicodeType} used to
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
163 facilitate easier checking for any string object. Using this is more
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
164 portable than using a sequence of the two string types constructed
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
165 elsewhere since it only contains \code{UnicodeType} if it has been
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
166 built in the running version of Python. For example:
bda98bac6956 Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
167 \code{isinstance(s, types.StringTypes)}.
23506
7ab8c3811723 Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23492
diff changeset
168 \versionadded{2.2}
20178
01a5c43f1894 added description of StringTypes object
Skip Montanaro <skip@pobox.com>
parents: 18273
diff changeset
169 \end{datadesc}