Why has python3 been created as a seperate language where there is still python2.7 ?

Stefan Behnel stefan_ml at behnel.de
Wed Jun 27 07:22:41 EDT 2012


Chris Angelico, 27.06.2012 13:02:
> On Wed, Jun 27, 2012 at 8:25 PM, Christian Tismer wrote:
>> I think, for the small importance of the print statement in code, it
>> would have made the transition easier, if python 3 was as flexible
>> as python 2.7, with a symmetric
>>
>> "from __past__ import print_statement" construct.
> 
> For how long? Will Python require, in perpetuity, the code to support
> this? Must the print statement be enhanced when the print function is?
> What about bug fixes? How much dev time is required to enable backward
> compatibility past a boundary across which backward compatibility was
> not promised? And if there's a limit to the duration of this __past__
> directive, when should it be and what should happen after that point?
> 
> Much easier to simply say no.

I concur. For supporting something that shouldn't have been there in the
first place, such as a print statement in production code, it's way too
much overhead to keep it working despite of significant changes in the I/O
layer that went into Python 3.x, including the removal of the soft-space
"feature".

For comparison, the revival of the "u" string prefix in Py3.3 is a simple
change in the parser grammar that's easy to maintain but that has a huge
impact on the Py3 compatibility of code that accepts to drop support for
Py2.5 and earlier (as well as Py3.[012]) but wants to keep working in
Py2.[67] (which supports the opposite "b" prefix). We've been supporting
that in Cython for a while and it worked out really well so far.

Stefan




More information about the Python-list mailing list