annotate Doc/lib/libtypes.tex @ 27998:e27f58a50737 legacy-trunk

SF bug #690377: Dud footnote reference in distutils docs
author Raymond Hettinger <python@rcn.com>
date Fri, 21 Feb 2003 02:47:09 +0000
parents b8724341bb1a
children 2a5e6009a445
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} ---
27197
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
2 Names for built-in types}
12223
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}
27197
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
5 \modulesynopsis{Names for 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
27198
b8724341bb1a Remove extra 'types'
Neal Norwitz <nnorwitz@gmail.com>
parents: 27197
diff changeset
8 This module defines names for some object types that are used by
27197
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
9 the standard Python interpreter, but not for the types defined by various
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
10 extension modules. Also, it does not include some of the types that
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
11 arise during processing such the \code{listiterator} type.
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
12 It is safe to use \samp{from types import *} ---
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
13 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
14 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
15 \samp{Type}.
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
16
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
17 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
18 their argument types, like the following:
7695
1ced03671574 Markup nits.
Fred Drake <fdrake@acm.org>
parents: 7633
diff changeset
19
7277
bf4e790bd61a Remove all \bcode / \ecode cruft; this is no longer needed. See previous
Fred Drake <fdrake@acm.org>
parents: 7221
diff changeset
20 \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
21 from types import *
27197
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
22 def delete(mylist, item):
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
23 if type(item) is IntType:
27197
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
24 del mylist[item]
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
25 else:
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
26 mylist.remove(item)
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
27 \end{verbatim}
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
28
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
29 Starting in Python 2.2, built-in factory functions such as
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
30 \function{int()} and \function{str()} are also names for the
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
31 corresponding types. This is now the preferred way to access
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
32 the type instead of using the \module{types} module. Accordingly,
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
33 the example above should be written as follows:
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
34
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
35 \begin{verbatim}
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
36 def delete(mylist, item):
a51e5ae29882 SF bug #652888: bad documentation for the "type" builtin
Raymond Hettinger <python@rcn.com>
parents: 23507
diff changeset
37 if isinstance(item, int):
27198
b8724341bb1a Remove extra 'types'
Neal Norwitz <nnorwitz@gmail.com>
parents: 27197
diff changeset
38 del mylist[item]
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
39 else:
27198
b8724341bb1a Remove extra 'types'
Neal Norwitz <nnorwitz@gmail.com>
parents: 27197
diff changeset
40 mylist.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
41 \end{verbatim}
7695
1ced03671574 Markup nits.
Fred Drake <fdrake@acm.org>
parents: 7633
diff changeset
42
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
43 The module defines the following names:
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
44
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
45 \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
46 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
47 \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
48
a8040b941864 Move files around in a different way, so CVS picks up all the changes. ;-)
Fred Drake <fdrake@acm.org>
parents: 8599
diff changeset
49 \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
50 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
51 \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
52 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
53
23507
c44b21fcd38a Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23491
diff changeset
54 \begin{datadesc}{BooleanType}
c44b21fcd38a Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23491
diff changeset
55 The type of the \class{bool} values \code{True} and \code{False}; this
c44b21fcd38a Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23491
diff changeset
56 is an alias of the built-in \function{bool()} function.
c44b21fcd38a Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23491
diff changeset
57 \versionadded{2.3}
c44b21fcd38a Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23491
diff changeset
58 \end{datadesc}
c44b21fcd38a Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23491
diff changeset
59
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
60 \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
61 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
62 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
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}{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
65 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
66 \end{datadesc}
5674
e5de707300e1 Added complex numbers (AMK).
Guido van Rossum <guido@python.org>
parents: 5660
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}{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
69 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
70 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
71
8733
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
72 \begin{datadesc}{ComplexType}
23491
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
73 The type of complex numbers (e.g. \code{1.0j}). This is not defined
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
74 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
75 \end{datadesc}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
76
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
77 \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
78 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
79 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
80
12272
0ac40e47bdb5 Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents: 12223
diff changeset
81 \begin{datadesc}{UnicodeType}
23491
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
82 The type of Unicode character strings (e.g. \code{u'Spam'}). This is
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
83 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
84 \end{datadesc}
0ac40e47bdb5 Marc-Andre Lemburg <mal@lemburg.com>:
Fred Drake <fdrake@acm.org>
parents: 12223
diff changeset
85
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
86 \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
87 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
88 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
89
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
90 \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
91 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
92 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
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}{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
95 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
96 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
97
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
98 \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
99 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
100 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
101
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
102 \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
103 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
104 \end{datadesc}
7831
1f8f2002bfb9 Several minor markup nits.
Fred Drake <fdrake@acm.org>
parents: 7768
diff changeset
105
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
106 \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
107 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
108 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
109
18273
9e326c9e6be5 Teach the types module about generators. Thanks to James Althoff on the
Tim Peters <tim.peters@gmail.com>
parents: 12272
diff changeset
110 \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
111 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
112 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
113 \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
114 \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
115
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
116 \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
117 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
118 \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
119 \end{datadesc}
2488
80729aff9057 added code objects
Guido van Rossum <guido@python.org>
parents: 2064
diff changeset
120
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
121 \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
122 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
123 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
124
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
125 \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
126 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
127 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
128
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
129 \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
130 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
131 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
132
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
133 \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
134 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
135 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
136
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
137 \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
138 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
139 \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
140 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
141
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
142 \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
143 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
144 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
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}{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
147 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
148 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
149
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
150 \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
151 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
152 \end{datadesc}
7291
b7f84d179e51 Minor stuff:
Fred Drake <fdrake@acm.org>
parents: 7277
diff changeset
153
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
154 \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
155 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
156 \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
157 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
158
8733
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
159 \begin{datadesc}{SliceType}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
160 The type of objects returned by
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
161 \function{slice()}\bifuncindex{slice}.
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
162 \end{datadesc}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
163
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
164 \begin{datadesc}{EllipsisType}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
165 The type of \code{Ellipsis}.
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
166 \end{datadesc}
aeafaf382a4b Added 3 missing types: ComplexType, SliceType, EllipsisType.
Guido van Rossum <guido@python.org>
parents: 8732
diff changeset
167
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
168 \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
169 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
170 \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
171 \end{datadesc}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
172
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
173 \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
174 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
175 \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
176 \end{datadesc}
12223
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
177
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
178 \begin{datadesc}{BufferType}
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
179 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
180 \function{buffer()}\bifuncindex{buffer} function.
e82e82b3b9ad Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 8918
diff changeset
181 \end{datadesc}
20178
01a5c43f1894 added description of StringTypes object
Skip Montanaro <skip@pobox.com>
parents: 18273
diff changeset
182
01a5c43f1894 added description of StringTypes object
Skip Montanaro <skip@pobox.com>
parents: 18273
diff changeset
183 \begin{datadesc}{StringTypes}
23491
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
184 A sequence containing \code{StringType} and \code{UnicodeType} used to
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
185 facilitate easier checking for any string object. Using this is more
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
186 portable than using a sequence of the two string types constructed
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
187 elsewhere since it only contains \code{UnicodeType} if it has been
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
188 built in the running version of Python. For example:
8673c2edf21c Add availability information for a couple of the types, and notes on writing
Fred Drake <fdrake@acm.org>
parents: 20179
diff changeset
189 \code{isinstance(s, types.StringTypes)}.
23507
c44b21fcd38a Added a version annotation for StringTypes.
Fred Drake <fdrake@acm.org>
parents: 23491
diff changeset
190 \versionadded{2.2}
20178
01a5c43f1894 added description of StringTypes object
Skip Montanaro <skip@pobox.com>
parents: 18273
diff changeset
191 \end{datadesc}