summaryrefslogtreecommitdiff
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2012-06-04 11:06:45 -0400
committerBarry Warsaw <barry@python.org>2012-06-04 11:06:45 -0400
commit9b10e1fbb9d730c310077c9778cc2e4896bc2143 (patch)
tree3f582a0c7fab796d6fc6e6ba182338b8f42e22e6 /Doc/library/sys.rst
parent90ca5c2aa14dc834b7bbdfec8289a6fb98c8b7c2 (diff)
downloadcpython-git-9b10e1fbb9d730c310077c9778cc2e4896bc2143.tar.gz
A few documentation improvements, spurred on by Brett's review.
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst23
1 files changed, 13 insertions, 10 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index db5f374e76..55c06ca643 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -619,12 +619,13 @@ always available.
.. data:: implementation
- An object containing the information about the implementation of the
- currently running Python interpreter. Its attributes are the those
- that all Python implementations must implement. They are described
- below.
+ An object containing information about the implementation of the
+ currently running Python interpreter. The following attributes are
+ required to exist in all Python implementations.
- *name* is the implementation's identifier, like ``'cpython'``.
+ *name* is the implementation's identifier, e.g. ``'cpython'``. The actual
+ string is defined by the Python implementation, but it is guaranteed to be
+ lower case.
*version* is a named tuple, in the same format as
:data:`sys.version_info`. It represents the version of the Python
@@ -633,7 +634,7 @@ always available.
interpreter conforms, which ``sys.version_info`` represents. For
example, for PyPy 1.8 ``sys.implementation.version`` might be
``sys.version_info(1, 8, 0, 'final', 0)``, whereas ``sys.version_info``
- would be ``sys.version_info(1, 8, 0, 'final', 0)``. For CPython they
+ would be ``sys.version_info(2, 7, 2, 'final', 0)``. For CPython they
are the same value, since it is the reference implementation.
*hexversion* is the implementation version in hexadecimal format, like
@@ -646,10 +647,12 @@ always available.
``cache_tag`` is set to ``None``, it indicates that module caching should
be disabled.
- Regardless of its contents, :data:`sys.implementation` will not
- change during a run of the interpreter, nor between implementation
- versions. (It may change between Python language versions,
- however.) See `PEP 421` for more information.
+ :data:`sys.implementation` may contain additional attributes specific to
+ the Python implementation. These non-standard attributes must start with
+ an underscore, and are not described here. Regardless of its contents,
+ :data:`sys.implementation` will not change during a run of the interpreter,
+ nor between implementation versions. (It may change between Python
+ language versions, however.) See `PEP 421` for more information.
.. versionadded:: 3.3