Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b10e1f

Browse files
committed
A few documentation improvements, spurred on by Brett's review.
1 parent 90ca5c2 commit 9b10e1f

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

Doc/library/sys.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -619,12 +619,13 @@ always available.
619619

620620
.. data:: implementation
621621

622-
An object containing the information about the implementation of the
623-
currently running Python interpreter. Its attributes are the those
624-
that all Python implementations must implement. They are described
625-
below.
622+
An object containing information about the implementation of the
623+
currently running Python interpreter. The following attributes are
624+
required to exist in all Python implementations.
626625

627-
*name* is the implementation's identifier, like ``'cpython'``.
626+
*name* is the implementation's identifier, e.g. ``'cpython'``. The actual
627+
string is defined by the Python implementation, but it is guaranteed to be
628+
lower case.
628629

629630
*version* is a named tuple, in the same format as
630631
:data:`sys.version_info`. It represents the version of the Python
@@ -633,7 +634,7 @@ always available.
633634
interpreter conforms, which ``sys.version_info`` represents. For
634635
example, for PyPy 1.8 ``sys.implementation.version`` might be
635636
``sys.version_info(1, 8, 0, 'final', 0)``, whereas ``sys.version_info``
636-
would be ``sys.version_info(1, 8, 0, 'final', 0)``. For CPython they
637+
would be ``sys.version_info(2, 7, 2, 'final', 0)``. For CPython they
637638
are the same value, since it is the reference implementation.
638639

639640
*hexversion* is the implementation version in hexadecimal format, like
@@ -646,10 +647,12 @@ always available.
646647
``cache_tag`` is set to ``None``, it indicates that module caching should
647648
be disabled.
648649

649-
Regardless of its contents, :data:`sys.implementation` will not
650-
change during a run of the interpreter, nor between implementation
651-
versions. (It may change between Python language versions,
652-
however.) See `PEP 421` for more information.
650+
:data:`sys.implementation` may contain additional attributes specific to
651+
the Python implementation. These non-standard attributes must start with
652+
an underscore, and are not described here. Regardless of its contents,
653+
:data:`sys.implementation` will not change during a run of the interpreter,
654+
nor between implementation versions. (It may change between Python
655+
language versions, however.) See `PEP 421` for more information.
653656

654657
.. versionadded:: 3.3
655658

0 commit comments

Comments
 (0)