| Line | |
|---|
| 1 | \section{Built-in Constants}
|
|---|
| 2 |
|
|---|
| 3 | A small number of constants live in the built-in namespace. They are:
|
|---|
| 4 |
|
|---|
| 5 | \begin{datadesc}{False}
|
|---|
| 6 | The false value of the \class{bool} type.
|
|---|
| 7 | \versionadded{2.3}
|
|---|
| 8 | \end{datadesc}
|
|---|
| 9 |
|
|---|
| 10 | \begin{datadesc}{True}
|
|---|
| 11 | The true value of the \class{bool} type.
|
|---|
| 12 | \versionadded{2.3}
|
|---|
| 13 | \end{datadesc}
|
|---|
| 14 |
|
|---|
| 15 | \begin{datadesc}{None}
|
|---|
| 16 | The sole value of \code{\refmodule{types}.NoneType}. \code{None} is
|
|---|
| 17 | frequently used to represent the absence of a value, as when default
|
|---|
| 18 | arguments are not passed to a function.
|
|---|
| 19 | \end{datadesc}
|
|---|
| 20 |
|
|---|
| 21 | \begin{datadesc}{NotImplemented}
|
|---|
| 22 | Special value which can be returned by the ``rich comparison''
|
|---|
| 23 | special methods (\method{__eq__()}, \method{__lt__()}, and friends),
|
|---|
| 24 | to indicate that the comparison is not implemented with respect to
|
|---|
| 25 | the other type.
|
|---|
| 26 | \end{datadesc}
|
|---|
| 27 |
|
|---|
| 28 | \begin{datadesc}{Ellipsis}
|
|---|
| 29 | Special value used in conjunction with extended slicing syntax.
|
|---|
| 30 | % XXX Someone who understands extended slicing should fill in here.
|
|---|
| 31 | \end{datadesc}
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.