[Python-ideas] Keyword to disambiguate python version

Tony Lownds tony at pagedna.com
Fri Aug 27 01:02:47 CEST 2010

> 1) It's not version number that matters, it's functionality. There are
> environments you can't even imagine where your code can be run.
> There are Python builds and flavours outside the CPython's version sequence.

Very true, but other Python flavors commonly specify what features they version 
of CPython's features they support. eg "Jython 2.5 implements the same language 
as CPython 2.5", "IronPython 2.7 Alpha 1 was released, supporting Python 2.7 features"

> 2) ... The right place to tell a user the environment your code was written for is
> documentation. A user just needs to know where to rely on you and where to take
> responsibility his/herself.

Well if a project you want to use doesn't specify what version they support pretty well, 
taking responsibility yourself is potentially time consuming...

I for one like the idea of having some automated systems take care of that, to lower 
the cost for projects to support a wider range of python versions. Establishing an idiom 
like was done for __future__ is only the start of that, and may not even be strictly 
necessary but it would be a good start.


More information about the Python-ideas mailing list