On Mon, Jun 4, 2012 at 11:10 AM, Barry Warsaw <ba...@python.org> wrote:

> 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.
>
>
OK, then I would add a test to make sure this happens, like
``self.assertEqual(sys.implementation.name, sys.implement.name.lower())``
if you don't want to bother documenting it to make sure other VMs conform.

-Brett

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

Reply via email to