Python 3 is killing Python

Marko Rauhamaa marko at pacujo.net
Wed Jul 16 07:52:31 CEST 2014


Steven D'Aprano <steve+comp.lang.python at pearwood.info>:

> On Tue, 15 Jul 2014 23:01:25 +0300, Marko Rauhamaa wrote:
>> In fact, I find the lazy use of Unicode strings at least as scary as
>> the lazy use of byte strings, especially since Python 3 sneaks
>> Unicode to the outer interfaces of the program (files, IPC).
>
> I'm not entirely sure I understand what you mean by "lazy use of
> Unicode strings". And I especially don't understand what you mean by
> "sneak". The fact that strings are Unicode is *the* biggest and most
> obvious new feature of Python 3.

I mean that sys.stdin and sys.stdout should deal with byte strings. I
mean that open(path) should open a file in binary mode. Thankfully, the
subprocess methods exchange bytes by default.

To me, the main difference between Python 2 and Python 3 is that in the
former, I use "..." everywhere, and in the latter, I use b"..."
everywhere. If I should need advanced text processing features, I'll go
through a decode() and encode().

> The Python devs aren't slaves, they get to choose what features they
> work on and which they don't. They don't owe *anybody* any feature
> they don't want to build, or care to support, and that includes
> continuing the 2.x series.

No need to erect straw men. Of course, the Python gods do whatever they
want. And you asked me to clarify my opinion, which I did. The breakage
of backward compatibility wasn't worth the new features.

But as I said, what is done is done. We'll live with the reality.

> As of right now, *new* projects ought to be written in Python 3.3 or
> better, unless you have a compelling reason not to. You don't have to
> port old projects in order to take advantage of Python 3 for new
> projects.

But my distro only provides Python 3.2. What's wrong with Python 3.2?
Why didn't anybody tell me to put off the migration?


Marko



More information about the Python-list mailing list