February 2006
Intermediate to advanced
648 pages
14h 53m
English
Approximately two dozen types are built into the Python interpreter and grouped into a few major categories, as shown in Table 3.1. The Type Name column in the table lists the name that can be used to check for that type using isinstance() and other type-related functions. Types include familiar objects such as numbers and sequences. Others are used during program execution and are of little practical use to most programmers. The next few sections describe the most commonly used built-in types.
| Type Category | Type Name | Description |
|---|---|---|
| None | types.NoneType | The null object None |
| Numbers | int | Integer |
| long | Arbitrary-precision integer | |
| float | Floating point | |
| complex | Complex number | |
| bool | Boolean (True or False) | |
| Sequences | str | Character ... |
Read now
Unlock full access