blob: c36b2fae64cefd43db0cbb9c16bc0c0cd9e2efb6 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001
2Built-in Constants
3==================
4
5A small number of constants live in the built-in namespace. They are:
6
7
Georg Brandl55ac8f02007-09-01 13:51:09 +00008.. XXX False, True, None are keywords too
9
Georg Brandl116aa622007-08-15 14:28:22 +000010.. data:: False
11
12 The false value of the :class:`bool` type.
13
Georg Brandl116aa622007-08-15 14:28:22 +000014
15.. data:: True
16
17 The true value of the :class:`bool` type.
18
Georg Brandl116aa622007-08-15 14:28:22 +000019
20.. data:: None
21
22 The sole value of :attr:`types.NoneType`. ``None`` is frequently used to
23 represent the absence of a value, as when default arguments are not passed to a
24 function.
25
26
27.. data:: NotImplemented
28
29 Special value which can be returned by the "rich comparison" special methods
30 (:meth:`__eq__`, :meth:`__lt__`, and friends), to indicate that the comparison
31 is not implemented with respect to the other type.
32
33
34.. data:: Ellipsis
35
36 The same as ``...``. Special value used mostly in conjunction with extended
Georg Brandlcb8ecb12007-09-04 06:35:14 +000037 slicing syntax for user-defined container data types, as in ::
Georg Brandl116aa622007-08-15 14:28:22 +000038
Georg Brandlcb8ecb12007-09-04 06:35:14 +000039 val = container[1:5, 7:10, ...]