list(...) and list comprehensions (WAS: Arithmetic sequences in Python)

Diez B. Roggisch deets at nospam.web.de
Wed Jan 18 14:46:24 EST 2006


> due to the nested parentheses.  Note that replacing list comprehensions 
> with list(...) doesn't introduce any nested parentheses; it basically 
> just replaces brackets with parentheses.

But you don't need the nested parentheses - use *args instead for the 
list-constructor.

list(a,b,c)

Apart from that, I hope that the [] stay in. After all, if they are kept 
around for literal list construction, the aren't free for other purposes 
anyway.

Regards,

Diez



More information about the Python-list mailing list