[Python-Dev] readd u'' literal support in 3.3?
Terry Reedy
tjreedy at udel.edu
Tue Dec 13 22:37:10 CET 2011
On 12/13/2011 10:54 AM, Vinay Sajip wrote:
> I started writing a tool today, tentatively called '2to23', which aims to do
> this. It's basically 2to3, but with a package of custom fixers in a package
> 'lib2to23.fixers' adapted from the corresponding fixers in lib2to3.
When, some year in the future, people want to drop Python 2
compatibility from their Python23 code, they will need a 23to3 tool. You
might keep this in mind when designing and documenting a bridge
language. For each 2to23 fixer, is there a 23to3 fixer so that
23to3(2to23(code)) == 2to3(code) or close enough. (23to3 can and should
assume that its input is the output of 2to23, and only look to convert
the ultimately temporary scaffolding inserted by 2to23.)
The point about documentation is to list the names that 2to23 introduces
(with its special meanings) and that 23to3 will remove (assuming the
special meanings). So these names should neither be in the 2 code before
running 2to23 nor added to 23 code (with a different meaning) before
running 23to3.
If 2to23 were paired with a 23to3, so people knew that its output is not
a deadend cul-de-sac, but a stepping stone to the future, it would be
even more attractive.
--
Terry Jan Reedy
More information about the Python-Dev
mailing list