blob: d1fdec009eae474c9f7d8cd7f2b23f5e0774cb25 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001.. highlightlang:: c
2
3
4.. _concrete:
5
6**********************
7Concrete Objects Layer
8**********************
9
10The functions in this chapter are specific to certain Python object types.
11Passing them an object of the wrong type is not a good idea; if you receive an
12object from a Python program and you are not sure that it has the right type,
13you must perform a type check first; for example, to check that an object is a
14dictionary, use :cfunc:`PyDict_Check`. The chapter is structured like the
15"family tree" of Python object types.
16
17.. warning::
18
19 While the functions described in this chapter carefully check the type of the
20 objects which are passed in, many of them do not check for *NULL* being passed
21 instead of a valid object. Allowing *NULL* to be passed in can cause memory
22 access violations and immediate termination of the interpreter.
23
24
25.. _fundamental:
26
27Fundamental Objects
28===================
29
30This section describes Python type objects and the singleton object ``None``.
31
Georg Brandl54a3faa2008-01-20 09:30:57 +000032.. toctree::
Georg Brandl116aa622007-08-15 14:28:22 +000033
Georg Brandl54a3faa2008-01-20 09:30:57 +000034 type.rst
35 none.rst
Georg Brandl116aa622007-08-15 14:28:22 +000036
37
38.. _numericobjects:
39
40Numeric Objects
41===============
42
43.. index:: object: numeric
44
Georg Brandl54a3faa2008-01-20 09:30:57 +000045.. toctree::
Georg Brandl116aa622007-08-15 14:28:22 +000046
Georg Brandl54a3faa2008-01-20 09:30:57 +000047 long.rst
48 bool.rst
49 float.rst
50 complex.rst
Georg Brandl116aa622007-08-15 14:28:22 +000051
52
53.. _sequenceobjects:
54
55Sequence Objects
56================
57
58.. index:: object: sequence
59
60Generic operations on sequence objects were discussed in the previous chapter;
61this section deals with the specific kinds of sequence objects that are
62intrinsic to the Python language.
63
Georg Brandl60bad0e2008-01-05 21:16:33 +000064.. XXX sort out unicode, str, bytes and bytearray
Georg Brandl116aa622007-08-15 14:28:22 +000065
Georg Brandl54a3faa2008-01-20 09:30:57 +000066.. toctree::
Georg Brandl116aa622007-08-15 14:28:22 +000067
Benjamin Petersondae32c12008-05-26 15:01:55 +000068 bytes.rst
Benjamin Petersonfbeb6b62008-05-26 16:04:49 +000069 bytearray.rst
Georg Brandl54a3faa2008-01-20 09:30:57 +000070 unicode.rst
71 buffer.rst
72 tuple.rst
73 list.rst
Georg Brandl116aa622007-08-15 14:28:22 +000074
75
76.. _mapobjects:
77
78Mapping Objects
79===============
80
81.. index:: object: mapping
82
Georg Brandl54a3faa2008-01-20 09:30:57 +000083.. toctree::
Georg Brandl116aa622007-08-15 14:28:22 +000084
Georg Brandl54a3faa2008-01-20 09:30:57 +000085 dict.rst
Georg Brandl116aa622007-08-15 14:28:22 +000086
Georg Brandl116aa622007-08-15 14:28:22 +000087
88.. _otherobjects:
89
90Other Objects
91=============
92
Georg Brandl54a3faa2008-01-20 09:30:57 +000093.. toctree::
Georg Brandl116aa622007-08-15 14:28:22 +000094
Georg Brandl54a3faa2008-01-20 09:30:57 +000095 set.rst
96 function.rst
97 method.rst
98 file.rst
99 module.rst
100 iterator.rst
101 descriptor.rst
102 slice.rst
103 weakref.rst
Benjamin Petersonb173f782009-05-05 22:31:58 +0000104 capsule.rst
Georg Brandl54a3faa2008-01-20 09:30:57 +0000105 cobject.rst
106 cell.rst
107 gen.rst
108 datetime.rst