[Python-Dev] [Python-checkins] cpython: Eric Snow's implementation of PEP 421.

Barry Warsaw barry at python.org
Mon Jun 4 17:10:02 CEST 2012


Thanks for the second set of eyes, Brett.

On Jun 04, 2012, at 10:16 AM, Brett Cannon wrote:

>> +.. data:: implementation
>> +
>> +   An object containing the information about the implementation of the
>> +   currently running Python interpreter.  Its attributes are the those
>>
>
>"the those" -> "those"

I actually rewrote this section a bit:

   An object containing information about the implementation of the
   currently running Python interpreter.  The following attributes are
   required to exist in all Python implementations.

>> +   that all Python implementations must implement.
>
>Should you mention that VMs are allowed to add their own attributes that
>are not listed?

Here's how I rewrote it:

   :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.

>>  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?

Yes, PEP 421 guarantees them to be lower cased.

   *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.

>I think you meant to say ``sys.version_info(2, 7, 2, 'final', 0)``.

Fixed.

>> +   However, for a structured record type use
>> :func:`~collections.namedtuple`
>>
>
>What's with the ~?

I'm not sure, but it seems to result in a cross-reference, and I see tildes
used elsewhere, so I guess it's some reST/docutils magic.  I left this one in
there.

Cheers,
-Barry


More information about the Python-Dev mailing list