[Python-ideas] Code version evolver

Chris Angelico rosuav at gmail.com
Thu Mar 14 16:47:51 EDT 2019


On Fri, Mar 15, 2019 at 7:39 AM francismb <francismb at email.de> wrote:
>
> 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 ?

What happens when someone wants to support multiple Python versions?
"Requires Python 3.5 or newer" is easy. Forcing people to install the
correct one for each version isn't.

ChrisA


More information about the Python-ideas mailing list