Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 1 | .. highlightlang:: c |
| 2 | |
| 3 | |
| 4 | .. _concrete: |
| 5 | |
| 6 | ********************** |
| 7 | Concrete Objects Layer |
| 8 | ********************** |
| 9 | |
| 10 | The functions in this chapter are specific to certain Python object types. |
| 11 | Passing them an object of the wrong type is not a good idea; if you receive an |
| 12 | object from a Python program and you are not sure that it has the right type, |
| 13 | you must perform a type check first; for example, to check that an object is a |
| 14 | dictionary, 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 | |
| 27 | Fundamental Objects |
| 28 | =================== |
| 29 | |
| 30 | This section describes Python type objects and the singleton object ``None``. |
| 31 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 32 | .. toctree:: |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 33 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 34 | type.rst |
| 35 | none.rst |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 36 | |
| 37 | |
| 38 | .. _numericobjects: |
| 39 | |
| 40 | Numeric Objects |
| 41 | =============== |
| 42 | |
| 43 | .. index:: object: numeric |
| 44 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 45 | .. toctree:: |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 46 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 47 | int.rst |
| 48 | bool.rst |
| 49 | long.rst |
| 50 | float.rst |
| 51 | complex.rst |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 52 | |
| 53 | |
| 54 | .. _sequenceobjects: |
| 55 | |
| 56 | Sequence Objects |
| 57 | ================ |
| 58 | |
| 59 | .. index:: object: sequence |
| 60 | |
| 61 | Generic operations on sequence objects were discussed in the previous chapter; |
| 62 | this section deals with the specific kinds of sequence objects that are |
| 63 | intrinsic to the Python language. |
| 64 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 65 | .. toctree:: |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 66 | |
Benjamin Peterson | 2b4b5ac | 2008-05-26 15:54:26 +0000 | [diff] [blame] | 67 | bytearray.rst |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 68 | string.rst |
| 69 | unicode.rst |
| 70 | buffer.rst |
| 71 | tuple.rst |
| 72 | list.rst |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 73 | |
| 74 | |
| 75 | .. _mapobjects: |
| 76 | |
| 77 | Mapping Objects |
| 78 | =============== |
| 79 | |
| 80 | .. index:: object: mapping |
| 81 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 82 | .. toctree:: |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 83 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 84 | dict.rst |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 85 | |
| 86 | |
| 87 | .. _otherobjects: |
| 88 | |
| 89 | Other Objects |
| 90 | ============= |
| 91 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 92 | .. toctree:: |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 93 | |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 94 | class.rst |
| 95 | function.rst |
| 96 | method.rst |
| 97 | file.rst |
| 98 | module.rst |
| 99 | iterator.rst |
| 100 | descriptor.rst |
| 101 | slice.rst |
| 102 | weakref.rst |
Larry Hastings | 402b73f | 2010-03-25 00:54:54 +0000 | [diff] [blame] | 103 | capsule.rst |
Georg Brandl | f684272 | 2008-01-19 22:08:21 +0000 | [diff] [blame] | 104 | cobject.rst |
| 105 | cell.rst |
| 106 | gen.rst |
| 107 | datetime.rst |
| 108 | set.rst |
Jeffrey Yasskin | 1aa4700 | 2009-05-08 21:51:06 +0000 | [diff] [blame] | 109 | code.rst |