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

Just just at xs4all.nl
Fri Feb 7 14:06:15 EST 2003


In article <mailman.1044641128.1904.python-list at python.org>,
 Jp Calderone <exarkun at intarweb.us> 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.

Just




More information about the Python-list mailing list