Re: is list comprehension necessary?

2010-11-21 Thread Aahz
In article 4cc701e7$0$1606$742ec...@news.sonic.net, John Nagle na...@animats.com wrote: Python isn't a functional language. It has some minimal functional capabilities, and there's a lobby that would like more. So far, that's mostly been resisted. Attempts to allow multiline lambdas have been

Re: is list comprehension necessary?

2010-11-21 Thread Michael Torrie
On 10/27/2010 05:37 AM, Roy Smith wrote: I agree. I resisted LCs when they first came out, passing them off as unnecessary, confusing, etc. Eventually, I came to be comfortable with them and use them often. I do use LCs fairly often, but only then a for loop would be ugly or inefficient.

Re: is list comprehension necessary?

2010-11-21 Thread Brian J Mingus
On Tue, Oct 26, 2010 at 3:31 AM, Xah Lee xah...@gmail.com wrote: ... No, list comprehensions are not nececessary, just like the plethora of expletives in the majority of your OPs on this list are not necessary. The question is are they useful, and the answer is the case of list comprehensions

Re: is list comprehension necessary?

2010-10-29 Thread Lawrence D'Oliveiro
In message mailman.264.1288112997.2218.python-l...@python.org, Andre Alexander Bell wrote: i = 5 l = [i**2 for i in range(3)] i 2 The last line comes out as 5 in Python 3.1. -- http://mail.python.org/mailman/listinfo/python-list

Re: is list comprehension necessary?

2010-10-29 Thread Lawrence D'Oliveiro
In message 4cc701e7$0$1606$742ec...@news.sonic.net, John Nagle wrote: The weird functional if syntax additions were a cave-in to the functional crowd, and may have been a mistake. The only mistake was not putting functional-if into the language in the first place, and having to use that

Re: is list comprehension necessary?

2010-10-28 Thread Xah Lee
On Oct 27, 5:46 pm, rantingrick rantingr...@gmail.com wrote: On Oct 26, 4:31 am, Xah Lee xah...@gmail.com wrote: recently wrote a article based on a debate here. (can't find the original thread on Google at the moment) Hey all you numbskulls who are contributing the annoying off-topic

Re: is list comprehension necessary?

2010-10-27 Thread Roy Smith
Andre Alexander Bell p...@andre-bell.de wrote: I occasionally use LCs, if they seem useful. However, what I don't like about LCs is that they 'look-like' being a closed scope [...] antingrick rantingr...@gmail.com wrote: I must admit you make a good point here however the only time that

Re: is list comprehension necessary?

2010-10-27 Thread rantingrick
On Oct 26, 4:31 am, Xah Lee xah...@gmail.com wrote: recently wrote a article based on a debate here. (can't find the original thread on Google at the moment) Hey all you numbskulls who are contributing the annoying off-topic chatter about Report Lab need to... 1) GET A LIFE 2) START A NEW

is list comprehension necessary?

2010-10-26 Thread Xah Lee
recently wrote a article based on a debate here. (can't find the original thread on Google at the moment) • 〈What's List Comprehension and Why is it Harmful?〉 http://xahlee.org/comp/list_comprehension.html it hit reddit.

Re: is list comprehension necessary?

2010-10-26 Thread John Nagle
On 10/26/2010 2:31 AM, Xah Lee wrote: recently wrote a article based on a debate here. (can't find the original thread on Google at the moment) • 〈What's List Comprehension and Why is it Harmful?〉 http://xahlee.org/comp/list_comprehension.html it hit reddit.

Re: is list comprehension necessary?

2010-10-26 Thread Andre Alexander Bell
Hello, I occasionally use LCs, if they seem useful. However, what I don't like about LCs is that they 'look-like' being a closed scope, while actually they are in the scope of there call. Example: i = 5 l = [i**2 for i in range(3)] i 2 Regards Andre --

Re: is list comprehension necessary?

2010-10-26 Thread Paul Rudin
Andre Alexander Bell p...@andre-bell.de writes: I occasionally use LCs, if they seem useful. However, what I don't like about LCs is that they 'look-like' being a closed scope, while actually they are in the scope of there call. Example: i = 5 l = [i**2 for i in range(3)] i 2 Although:

Re: is list comprehension necessary?

2010-10-26 Thread Ian Kelly
On Tue, Oct 26, 2010 at 11:07 AM, Andre Alexander Bell p...@andre-bell.dewrote: Hello, I occasionally use LCs, if they seem useful. However, what I don't like about LCs is that they 'look-like' being a closed scope, while actually they are in the scope of there call. Example: i = 5 l =

RE: is list comprehension necessary?

2010-10-26 Thread Mikael B
That's from the functional programming crowd. Python isn't a functional language. A noob question: what is a functional language? What does it meen? -- http://mail.python.org/mailman/listinfo/python-list

Re: is list comprehension necessary?

2010-10-26 Thread Andre Alexander Bell
On 10/26/2010 07:22 PM, Ian Kelly wrote: i = 5 l = [i**2 for i in range(3)] i 2 This has been corrected in Python 3. Sorry. You're right. I forgot to mention that... Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: is list comprehension necessary?

2010-10-26 Thread Chris Rebert
On 10/26/10, Mikael B mba...@live.se wrote: That's from the functional programming crowd. Python isn't a functional language. A noob question: what is a functional language? What does it meen? A language which supports the functional programming paradigm:

Re: is list comprehension necessary?

2010-10-26 Thread Dan Stromberg
On Tue, Oct 26, 2010 at 10:31 AM, Mikael B mba...@live.se wrote: That's from the functional programming crowd. Python isn't a functional language. A noob question: what is a functional language? What does it meen? -- http://mail.python.org/mailman/listinfo/python-list It's a

Re: is list comprehension necessary?

2010-10-26 Thread rantingrick
On Oct 26, 11:29 am, John Nagle na...@animats.com wrote: On 10/26/2010 2:31 AM, Xah Lee wrote: recently wrote a article based on a debate here. (can't find the original thread on Google at the moment) • 〈What's List Comprehension and Why is it Harmful?〉

Re: is list comprehension necessary?

2010-10-26 Thread rantingrick
On Oct 26, 12:07 pm, Andre Alexander Bell p...@andre-bell.de wrote: Hello, I occasionally use LCs, if they seem useful. However, what I don't like about LCs is that they 'look-like' being a closed scope, while actually they are in the scope of there call. Example: i = 5 l = [i**2 for i

Re: is list comprehension necessary?

2010-10-26 Thread Gary Herron
On 10/26/2010 09:28 PM, rantingrick wrote: On Oct 26, 12:07 pm, Andre Alexander Bellp...@andre-bell.de wrote: Hello, I occasionally use LCs, if they seem useful. However, what I don't like about LCs is that they 'look-like' being a closed scope, while actually they are in the scope of there