List comprehensions' ugliness (Was: Re: How to explain exactly what "def" does?)

Just just at
Fri Feb 7 20:06:15 CET 2003

In article <mailman.1044641128.1904.python-list at>,
 Jp Calderone <exarkun at> wrote:

>   If you find the unpredictable semantics of += for lists to be bad, I
> imagine you won't like this, either:
>   x = ([],)
>   x[0] += [1]
>   Be sure to examine x again, after the second line executes ;)

WOW. Nasty.


More information about the Python-list mailing list