[Python-Dev] Features for Python 2.0

Moshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Tue, 25 Jul 2000 16:00:07 +0300 (IDT)


On Tue, 25 Jul 2000, Guido van Rossum wrote:

> > Would anyone feel really bad if we postpone list comprehensions and
> > augmented assignments to a later version? I'm a bit afraid of those
> > features, since they are quite large, and it is yet uncertain how programs
> > which use those features will look. (OTOH, zip will simply replace some
> > map(None) and iterating in parallel by index, and [0:10:2] will replace
> > range(0, 10, 2), so we have a pretty good idea about their effects)
> 
> If you folks hadn't wasted so much time discussion augmented print
> statements and new operators, we could have had the augmented
> assignments and list comprehensions checked in already!
> 
> If you have a specific objection, raise it.  Drop the meta issues.

OK, here's a possible confusion point in augmented assignments:

Sometimes

c = a
a += b
assert  a is c

fails, and sometimes not, depending on a's type. This is just begging
for trouble. Maybe it will cause massive confusion, maybe it won't. I know
I'll usually be wary of using it.

List comprehensions' problems is that we cannot find a syntax that we all
agree is readable. Perhaps the answer is not list comprehensions, but
lexical scoping combined with steroid versions of map and filter, together
with zip to bind things together. 

--
Moshe Zadka <moshez@math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez