[Let's try this again since my last reply was rejected for being too large]
On Mon, Jun 4, 2012 at 9:52 AM, barry.warsaw <python-check...@python.org> wrote: > http://hg.python.org/cpython/rev/9c445f4695c1 > changeset: 77339:9c445f4695c1 > parent: 77328:0808cb8c60fd > user: Barry Warsaw <ba...@python.org> > date: Sun Jun 03 16:18:47 2012 -0400 > summary: > Eric Snow's implementation of PEP 421. > > Issue 14673: Add sys.implementation > > files: > Doc/library/sys.rst | 38 ++++ > Doc/library/types.rst | 24 ++ > Include/Python.h | 1 + > Include/namespaceobject.h | 17 + > Lib/test/test_sys.py | 18 ++ > Lib/test/test_types.py | 143 ++++++++++++++++- > Lib/types.py | 1 + > Makefile.pre.in <http://makefile.pre.in/> | 2 + > Objects/namespaceobject.c | 225 ++++++++++++++++++++++++++ > Objects/object.c | 3 + > Python/sysmodule.c | 72 ++++++++- > 11 files changed, 541 insertions(+), 3 deletions(-) > > > diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst > --- a/Doc/library/sys.rst > +++ b/Doc/library/sys.rst > @@ -616,6 +616,44 @@ > > Thus ``2.1.0a3`` is hexversion ``0x020100a3``. > > + > +.. data:: implementation > + > + An object containing the information about the implementation of the > + currently running Python interpreter. Its attributes are the those > "the those" -> "those" > + that all Python implementations must implement. Should you mention that VMs are allowed to add their own attributes that are not listed? > They are described > + below. > + > + *name* is the implementation's identifier, like ``'cpython'``. > Is this guaranteed to be lowercase, or does it simply happen to be lowercase in this instance? > + > + *version* is a named tuple, in the same format as > + :data:`sys.version_info`. It represents the version of the Python > + *implementation*. This has a distinct meaning from the specific > + version of the Python *language* to which the currently running > + 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)``. I think you meant to say ``sys.version_info(2, 7, 2, 'final', 0)``. What's with the ~? -Brett
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com