[Python-ideas] Code version evolver

francismb francismb at email.de
Thu Mar 14 16:33:21 EDT 2019

Hi Steven,

On 3/12/19 12:25 AM, Steven D'Aprano wrote:
> I don't know who you expect is using this: the Python core developers
> responsible for adding new language features and changing the grammar,
> or Python programmers.
Python core devs should write the 'python_next' and 'is_python_code'
parts that moves source code from the current version to the next if a
backwards incompatible grammar change is needed.

Python programmers may use the helpers to upgrade to the next version.

> I don't know what part of the current code (current code of *what*?) is
> supposed to be upgraded or evolved, or what you mean by that. Do you
> mean using this to add new grammatical features to the interpreter?
> Do you mean something like 2to3? Something which transforms source code
> written in Python?
Yes a source transformer, but to be applied to some 3.x version to move
it to the next 3.x+1, and so on ... (instead of '2to3' a kind of
'nowtonext', aka 'python_next')

Couldn't that relax the tension on doing 'backward compatibility
changes' a bit ?


More information about the Python-ideas mailing list