There are many thing he didn't intend from the outset, so that by itself isn't so significant. Some other things he didn't intend were the type/class dichotomy and the inability to raise an exception from comparison. Two changes that come from external users include David Ascher's rich comparisons and Samuele Pedroni's proposal to use the C3 method resolution order.
Van Rossum's preference for loops over map dates to at least 1994, which you can see in http://legacy.python.org/search/hypermail/python-1994q2/0705... :
> "Steven Majewski might not agree with me, but in Python you are better
off using "for" loops (the overhead of calling a function for each
element is quite substantial)."
You can see that's still true with CPython:
% python -mtimeit -c 'x=range(100)' 'd=[]' 'for a in x: d.append(a*a)'
10000 loops, best of 3: 22.1 usec per loop
% python -mtimeit -c 'x=range(100)' 'map(lambda a: a*a, x)'
100000 loops, best of 3: 18.2 usec per loop
% python -mtimeit -c 'x=range(100)' 'd=[];ADD=d.append' 'for a in x: ADD(a*a)'
100000 loops, best of 3: 12.7 usec per loop
% python -mtimeit -c 'x=range(100)' '[a*a for a in x]'
100000 loops, best of 3: 9.91 usec per loop
FWIW, Python has made at least one language change in order to improve performance. In Python 1.x the following was possible:
def f(x):
from math import *
return cos(x*sin(x))
Python 1 used a dictionary for locals, while Python 2 introduced a pre-allocated array of variables for locals so lookup could be done via a simple index offset.
In the same email, van Rossum writes:
> "To be honest, I wish I hadn't introduced lambda, map, filter and reduce -- they support a style that is inconsistent with the rest of Python. Unfortunately, in the sake of backward compatibility, I can't take them out. So enjoy them if you have to. But don't get too thrilled!"
That same email also says:
> Ah, the infamous "first class objects" argument again. Really, I don't understand all the fuzz about lambda, and I don't see why its introduction made functions any more first class than they already were in Python. They are entirely syntactic sugar for local function definitions. Everything you can do with lambda you could always do with local functions, at the cost of one local temporary identifier -- surely no big deal!
This is interesting because you mentioned "initial accident of first-class functions". Why do you think first-class objects are an "initial accident", and not a deliberate decision?