Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
92058d29
Commit
92058d29
authored
Jan 20, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#652749: document the constants added to the builtins by site.py.
parent
440f2fff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
Doc/library/constants.rst
Doc/library/constants.rst
+25
-2
Doc/library/functions.rst
Doc/library/functions.rst
+2
-0
No files found.
Doc/library/constants.rst
View file @
92058d29
Built-in Constants
==================
...
...
@@ -47,4 +46,28 @@ 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.
Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
See also the :keyword:`assert` statement.
\ No newline at end of file
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).
Doc/library/functions.rst
View file @
92058d29
...
...
@@ -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
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment