#652749: document the constants added to the builtins by site.py.
This commit is contained in:
parent
440f2fff14
commit
92058d2933
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
Built-in Constants
|
Built-in Constants
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
@ -48,3 +47,27 @@ A small number of constants live in the built-in namespace. They are:
|
||||||
This constant is true if Python was not started with an :option:`-O` option.
|
This constant is true if Python was not started with an :option:`-O` option.
|
||||||
Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
|
Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
|
||||||
See also the :keyword:`assert` statement.
|
See also the :keyword:`assert` statement.
|
||||||
|
|
||||||
|
|
||||||
|
Constants added by the :mod:`site` module
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
The :mod:`site` module (which is imported automatically during startup, except
|
||||||
|
if the :option:`-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.
|
||||||
|
|
||||||
|
.. data:: quit([code=None])
|
||||||
|
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 :exc:`SystemExit` with the
|
||||||
|
specified exit code, and when .
|
||||||
|
|
||||||
|
.. data:: copyright
|
||||||
|
license
|
||||||
|
credits
|
||||||
|
|
||||||
|
Objects that when printed, print a message like "Type license() to see the
|
||||||
|
full license text", and when called, display the corresponding text in a
|
||||||
|
pager-like fashion (one screen at a time).
|
||||||
|
|
|
@ -511,6 +511,8 @@ available. They are listed here in alphabetical order.
|
||||||
topic, and a help page is printed on the console. If the argument is any other
|
topic, and a help page is printed on the console. If the argument is any other
|
||||||
kind of object, a help page on the object is generated.
|
kind of object, a help page on the object is generated.
|
||||||
|
|
||||||
|
This function is added to the built-in namespace by the :mod:`site` module.
|
||||||
|
|
||||||
.. versionadded:: 2.2
|
.. versionadded:: 2.2
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue