blob: 1f56b05bcbdf2815442450b59b03061ce7fb8464 [file] [log] [blame]
Fred Drake74bcac42003-01-02 05:13:51 +00001\section{Built-in Constants}
Skip Montanaro17804b12003-01-01 20:33:38 +00002
Fred Drake74bcac42003-01-02 05:13:51 +00003A small number of constants live in the built-in namespace. They are:
Skip Montanaro17804b12003-01-01 20:33:38 +00004
5\begin{datadesc}{False}
Fred Drake74bcac42003-01-02 05:13:51 +00006 The false value of the \class{bool} type.
7 \versionadded{2.3}
Skip Montanaro17804b12003-01-01 20:33:38 +00008\end{datadesc}
9
10\begin{datadesc}{True}
Fred Drake74bcac42003-01-02 05:13:51 +000011 The true value of the \class{bool} type.
12 \versionadded{2.3}
Skip Montanaro17804b12003-01-01 20:33:38 +000013\end{datadesc}
14
15\begin{datadesc}{None}
Fred Drake74bcac42003-01-02 05:13:51 +000016 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.
Skip Montanaro17804b12003-01-01 20:33:38 +000019\end{datadesc}
20
Fred Drake74bcac42003-01-02 05:13:51 +000021\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}
Georg Brandl52318d62006-09-06 07:06:08 +000029 The same as \code{...}.
30 Special value used mostly in conjunction with extended slicing syntax
31 for user-defined container data types.
Fred Drake74bcac42003-01-02 05:13:51 +000032 % XXX Someone who understands extended slicing should fill in here.
33\end{datadesc}