blob: 7aa0ea06fc25058a08639a7c8c2d34069e7ab649 [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}
Georg Brandl4e9165d2007-04-01 21:29:15 +000016 The sole value of \member{\refmodule{types}.NoneType}. \code{None} is
Fred Drake74bcac42003-01-02 05:13:51 +000017 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}
29 Special value used in conjunction with extended slicing syntax.
30 % XXX Someone who understands extended slicing should fill in here.
31\end{datadesc}