Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +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 | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 32 | .. toctree:: |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 33 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 34 | type.rst |
| 35 | none.rst |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 36 | |
| 37 | |
| 38 | .. _numericobjects: |
| 39 | |
| 40 | Numeric Objects |
| 41 | =============== |
| 42 | |
| 43 | .. index:: object: numeric |
| 44 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 45 | .. toctree:: |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 46 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 47 | long.rst |
| 48 | bool.rst |
| 49 | float.rst |
| 50 | complex.rst |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 51 | |
| 52 | |
| 53 | .. _sequenceobjects: |
| 54 | |
| 55 | Sequence Objects |
| 56 | ================ |
| 57 | |
| 58 | .. index:: object: sequence |
| 59 | |
| 60 | Generic operations on sequence objects were discussed in the previous chapter; |
| 61 | this section deals with the specific kinds of sequence objects that are |
| 62 | intrinsic to the Python language. |
| 63 | |
Georg Brandl | 60bad0e | 2008-01-05 21:16:33 +0000 | [diff] [blame] | 64 | .. XXX sort out unicode, str, bytes and bytearray |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 65 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 66 | .. toctree:: |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 67 | |
Benjamin Peterson | dae32c1 | 2008-05-26 15:01:55 +0000 | [diff] [blame] | 68 | bytes.rst |
Benjamin Peterson | fbeb6b6 | 2008-05-26 16:04:49 +0000 | [diff] [blame] | 69 | bytearray.rst |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 70 | unicode.rst |
| 71 | buffer.rst |
| 72 | tuple.rst |
| 73 | list.rst |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 74 | |
| 75 | |
| 76 | .. _mapobjects: |
| 77 | |
| 78 | Mapping Objects |
| 79 | =============== |
| 80 | |
| 81 | .. index:: object: mapping |
| 82 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 83 | .. toctree:: |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 84 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 85 | dict.rst |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 86 | |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 87 | |
| 88 | .. _otherobjects: |
| 89 | |
| 90 | Other Objects |
| 91 | ============= |
| 92 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 93 | .. toctree:: |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 94 | |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 95 | 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 Peterson | b173f78 | 2009-05-05 22:31:58 +0000 | [diff] [blame] | 104 | capsule.rst |
Georg Brandl | 54a3faa | 2008-01-20 09:30:57 +0000 | [diff] [blame] | 105 | cell.rst |
| 106 | gen.rst |
| 107 | datetime.rst |
Alexandre Vassalotti | 7b82b40 | 2009-07-21 04:30:03 +0000 | [diff] [blame] | 108 | code.rst |