Python Built-in Constants
A small number of constants live in the built-in namespace. They are:
Boolean Constants
True
The true value of the bool type. Assignments to True are illegal and raise a SyntaxError.
False
The false value of the bool type. Assignments to False are illegal and raise a SyntaxError.
Singleton Constants
None
The sole value of the type NoneType. None is frequently used to represent the absence of a value, as when default arguments are not passed to a function. Assignments to None are illegal and raise a SyntaxError.
Ellipsis
The same as the literal .... Special value used mostly in conjunction with extended slicing syntax for user-defined container data types.
NotImplemented
Special value which should be returned by the binary special methods (e.g. __eq__(), __lt__(), __add__(), __rsub__(), etc.) to indicate that the operation is not implemented with respect to the other type.
Constants Added by the site Module
The site module (which is imported automatically during startup, except if the -S command-line option is given) adds several constants to the built-in namespace. They are useful for the interactive interpreter shell and should not be used in programs.
quit(code=None) and exit(code=None)
Objects that when printed, print a message like "Use quit() or Ctrl-D (i.e. EOF) to exit", and when called, raise SystemExit with the specified exit code.
copyright and credits
Objects that when printed or called, print the text of the copyright or credits, respectively.
license
Object that when printed, prints the message "Type license() to see the full license text", and when called, displays the full license text in a pager-like fashion (if possible).
Other Constants
__debug__
This constant is true if Python was not started with an -O option. Assignments to __debug__ are illegal and raise a SyntaxError.