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

2006-01-20 Thread Rocco Moretti
Antoon Pardon wrote: > Well we could have list(a) return [a], and have a list_from_iterable. > Although I would prefer a different name. Or reverse it - list() always takes a single iterable, and list_from_scalars() is defined something like follows: >>> def list_from_scalars(*args): retu

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

2006-01-20 Thread Antoon Pardon
Op 2006-01-18, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: > Giovanni Bajo schrieb: >> Diez B. Roggisch wrote: >> due to the nested parentheses. Note that replacing list comprehensions with list(...) doesn't introduce any nested parentheses; it basically just replaces brackets wi

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

2006-01-18 Thread Diez B. Roggisch
Steve Holden schrieb: > Diez B. Roggisch wrote: >>> 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 - u

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

2006-01-18 Thread Diez B. Roggisch
Giovanni Bajo schrieb: > Diez B. Roggisch wrote: > >>> 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 *

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

2006-01-18 Thread Steve Holden
Diez B. Roggisch wrote: >>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 > lis

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

2006-01-18 Thread Giovanni Bajo
Diez B. Roggisch wrote: >> 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-c

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

2006-01-18 Thread Diez B. Roggisch
> 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) Apar

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

2006-01-18 Thread Steven Bethard
Tom Anderson <[EMAIL PROTECTED]> wrote: > Sounds good. More generally, i'd be more than happy to get rid of list > comprehensions, letting people use list(genexp) instead. That would > obviously be a Py3k thing, though. Alex Martelli wrote: > I fully agree, but the BDFL has already (tentativel