On 1/26/2010 6:47 PM, Xah Lee wrote:
Some thoughts about Python 3 Adoption.

Xah Lee, 2010-01-26

Some notes of Wikipedia readings related to Python.

Unladen Swallow, a new project from Google. It is a new python
compiler with the goal of 5 times faster than the de facto standand
implementation CPython. Also note Stackless Python, which is already
been used in some major commercial projects.

Was looking into what's new in Python 3. See: 
http://docs.python.org/dev/3.0/whatsnew/3.0.html.
 From a quick reading, i don't really like it. Here's some highlights:

     * Print is now a function. Great, much improvement.

Something we agree on. For simple scripts, it is a bit of a nuisance, but it eliminates kludgy special-case syntax for options, which are now normal keyword arguments.

     * Many functions that return lists now returns “Views” or
“Iterators” Instead. A fucking fuck all fucked up shit. A extraneous
“oop engineering” complication. (See: Lambda in Python 3000)

Something we disagree on. I consider the shift from list or iterator orientation a major advance. If you ever want to iterate a 10 million item dict or map or filter a 100 million item sequence, you might then see the point.

     * The cmp() function used in sort is basically gone, users are now
supposed to use the “key” parameter instead. This is a flying-face-
fuck to computer science. This would be the most serious fuckup in
python 3. (See: Sorting in Python and Perl)

It is completely gone. Cmp was kludgy. Sort paid no attention to the tri-state return but only paid attention to the less-than branch. Which means a) that it was redundant with the less than method and that the effort to split == from > was completely wasted. It is difficult to find use cases where cmp= is superior to key=

     * Integers by default is long. Great!
     * Much more integrated unicode support, rewrite of most its text
or string semantics. Fantastic. Finally.

What is missing now on Windows is better support from the OS, at least with XP. I have not tried 3.1 on Win7 yet (and never touched Vista).

Am looking because i wonder if i should switch to python 3 for my own
few scripts, and rewrite my Python Tutorial for version 3.

I am writing my book on algorithms using 3.1 because of the above and other improvements (consistent / and elimination of old classes, for instance).

> Am also
interested to know how python 3 is received by the computing industry.
Apparantly, a little search on the web indicates that vast majority of
python base have not switched,

Some people have panicked prematurely.

Guido never expected that working old apps would all be switched. There is probably code still being run with 1.5 from 15 years ago. And there will be 2.7 code running at least that far in the future.

Even before 3.0 was out, he also never expected major uptake until 3.2, which is a year away. 3.0 was, well, a .0 release with a couple of .0 problems. 3.1 is pretty solid and modules are appearing for it.

as expected, for many good reasons.
Vast majority of major python modules and tools have not switched.

A few have, more will in the next year or after 3.2 is released, some never will. The most important one, in my opinion, is numpy, since some module authors who *want* to do a 3.x version are waiting on that.

Most linux distro have not switched,

Have any switched to 2.6 yet, as the default? Some do have 3.1 version available.

> i don't find any large
corporation having adopted Python 3 (Google, Yahoo, Facebook,
NASA,... ). (sources: Source, Source) Basically, such a incompatible
change with trivial, ideological improvements, is too costy to switch.

The major reduction of redundancy by the overdue removal of obsolete features makes it a much nicer language to learn than, say, 2.6. It is much closer to the simplicity of 1.4, which is what I started with.

Terry Jan Reedy


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to