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

Christian Tismer tismer at stackless.com
Wed Jun 27 12:25:56 CEST 2012

On 26.06.12 08:34, Stefan Behnel wrote:
> Devin Jeanpierre, 26.06.2012 08:15:
>> On Mon, Jun 25, 2012 at 11:35 PM, Steven D'Aprano
>>> Making print a statement in the first place was a mistake, but
>>> fortunately it was a simple enough mistake to rectify once the need for
>>> backward compatibility was relaxed.
>> Hmmm, why is the function so much better than the statement? You like
>> using it in expressions? Or is it that you like passing it in as a
>> callback?
> First of all, the statement has a rather special syntax that is not obvious
> and practically non-extensible. It also has hidden semantics that are hard
> to explain and mixes formatting with output - soft-space, anyone?
> The function is straight forward, configurable, does one thing, works with
> help() and doesn't get in the way. And something as rarely[1] used as a
> print simply doesn't deserve special syntax. Oh, and, yes, you can even
> pass it into some code as callback, although I rarely had a need for that.
I agree, and I don't want to revive an old discussion of the print statement.
I just still don't see the point why the transition is made so uni-directional?

With python2.7, it is great that "from __future__ import print_function"

But porting old code (PIL for instance) imposes a lot of changes which
don't make sense, but produce overhead. Some are simple things like
the print statement, which is used only in the debugging code.
Enforcing the syntax change enforces changing many modules, which could
otherwise work just fine as they are.

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.

That would have at least my acceptance much quicker, because the necessity
of modifying stuff would reduce to the few changes which are important
in a few modules.

So right now, I try to use python 3, but the flexibility is right now
in python2.7 .

cheers - Chris

Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
work +49 173 24 18 776  mobile +49 173 24 18 776  fax n.a.
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/

More information about the Python-list mailing list