Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)
Mark H Harris
harrismh777 at gmail.com
Tue Mar 25 04:48:04 CET 2014
On 3/24/14 8:45 PM, Steven D'Aprano wrote:
> Your insistence that lambda is confusing is awfully condescending. People
> are not as dumb as you insist, and they are perfectly capable of learning
> lambda without a comp sci degree. Like any technical jargon, there is
> vocabulary and meaning to learn, but the concept is no more difficult
> than ordinary def functions.
This is an Ad Hominem. My opinion that lambda is confusing must not be
construed to mean condescension; not coming from my pen.
I do not insist that people are dumb, nor do I insist that people cannot
learn python without a comp sci degree. Pushing those words into my
mouth and then beating me up for saying them is, well, ad hominem.
What I am insisting is that *many* people, as point of fact, are
confused by the python lambda construct particularly when it is embedded
within a for x in and the lambda is supposed to capture the value x
(as in my previous examples). This say nothing of their intelligence and
says nothing about my supposed motive of condescension. (we my judge
actions, but not motives)
I am advocating for understanding, among all python users--- novice and
expert alike. Especially when I find so many experts who want to "know"
(like the OP on this thread) and other experts who (like ecumenical
councils) cannot agree (also noticed on this thread).
I am not seeking over simplification, and I am not seeking to limit the
expert in any way; just advocating for Aristotle's mean, whereat we
More information about the Python-list