[Python-ideas] Specifying Python version

Steven D'Aprano steve at pearwood.info
Wed May 16 20:33:25 EDT 2018


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 have new reserved words. In 
> most cases the new file would merely be a copy of the original, but with 
> an updated Python version.

That would be a serious PITA for modules which have to work with more 
than one version of Python.


-- 
Steve


More information about the Python-ideas mailing list