Re: [Python-ideas] Specifying Python version

2018-05-17 Thread Brice Parent
It's in the same spirit as what I proposed in my answer to Guido's crazy idea, but set at a different level (in code instead of in setup.py in my proposal). I think it belongs to the same discussion, so I'm copying it here (sorry for the inconvenience if you already read it there): Le 16/05

Re: [Python-ideas] Specifying Python version

2018-05-16 Thread Cameron Simpson
On 17May2018 10:33, Steven D'Aprano wrote: On Wed, May 16, 2018 at 08:02:47PM +0100, MRAB wrote: Instead of verbatim identifiers, how about a special comment giving the Python version in which the file was written? There could then be a tool similar to 2to3 that converts the file to a more rec

Re: [Python-ideas] Specifying Python version

2018-05-16 Thread Steven D'Aprano
On Wed, May 16, 2018 at 08:02:47PM +0100, MRAB wrote: > Instead of verbatim identifiers, how about a special comment giving the > Python version in which the file was written? > > There could then be a tool similar to 2to3 that converts the file to a > more recent version of Python that might ha

[Python-ideas] Specifying Python version

2018-05-16 Thread MRAB
Instead of verbatim identifiers, how about a special comment giving the Python version in which the file was written? There could then be a tool similar to 2to3 that converts the file to a more recent version of Python that might have new reserved words. In most cases the new file would merely