[Python-ideas] documentation: mention the version in which a syntax construct was added

Nick Coghlan ncoghlan at gmail.com
Mon Apr 18 07:35:18 CEST 2011


On Mon, Apr 18, 2011 at 2:00 PM, Mathias Panzenböck
<grosser.meister.morti at gmx.net> wrote:
> I wonder in which version the "except Foo as e" syntax was added (as opposed
> to "except Foo, e"). The documentations does not state this but I think it
> wasn't there in Python 2.4.

It was new in 2.6 to match the way 3.x does it (see PEP 3110).

> I propose that such things are always mentioned in the documentation and
> formated so that you can easily find the version numbers.

That's actually a very good point. We're reasonably consistent about
doing this in the library reference (via the "versionadded" and
"versionchanged" tags), but it hasn't been done for the language
reference.

Fixing this would basically involve taking PEP 291, as well as the
What's New documents for 2.6 and 2.7, and using that information to
update the 2.7 language reference with appropriate annotations.

The comparable change for 3.x would use the 3.1 and 3.2 What's New to
update the 3.2 documentation (with a forward port to the 3.3
development line).

Keeping it in mind for future changes that affect the language
reference (such as PEP 380) is easy enough, but, as Ben noted, it will
require someone to submit the requisite patches in order to
retroactively add this information for past changes.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list