Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Mar 27 20:34:23 EDT 2014


On Thu, 27 Mar 2014 10:44:49 -0500, Mark H Harris wrote:

> On 3/26/14 1:35 AM, alex23 wrote:
>> On 25/03/2014 12:39 PM, Mark H Harris wrote:
>>> my version semantically is "how it is perceived" by the user
>>
>> Could you please stop claiming to have insight into the comprehension
>> of anyone other than yourself? Hasty generalisations don't help your
>> argument.
> 
> hi alex23,  please don't be silly.
> 
> Who is being hasty?  How do you know its a generalization?

When you claim to speak for "the user" (your words, not mine), as in the 
quote above, what else could it be than a generalisation? Unless you 
believe that there actually is *one single person* using Python, you are 
generalising the millions of users (note plural) into one idealised user 
who speaks for all.


> My comments here are not in the least hasty, nor are they
> generalizations. 

Of course they are. Unless you claim that there is literally only one 
person using Python -- which is obviously absurd -- you are making a 
statement about the huge variety of Python users as if they all agreed on 
this matter. That is a generalisation.

It might even be a valid generalisation, although I doubt it. You have a 
pattern of discounting or rejecting the needs and desires of *most* 
programmers in favour of what you perceive as the needs and wants of a 
*tiny* subset of inexperienced programmers -- those who aren't interested 
in becoming experienced, but want to continue programming -- as if they 
were all users of Python. They are not. Not even close. And they are 
certainly not the people who keep Python alive and well -- if anything, 
they are users in the sense that they *use* Python and the resources of 
the Python community, but they will never, ever give back.

Maybe your generalisation about *users* is more apt than either of us 
realised.

Your generalisation doesn't even apply to *all* inexperienced beginners. 
If you wanted to turn Python into a teaching language, that would be an 
interesting proposal, but you don't. Consider your recent comments that √ 
should be allowed as an identifier, and that it should be a built-in. 
Screw the people who know and understand Unicode rules, your suggestion 
would break their expectations, but those users don't count for you. 
Presumably, anyone who knows Unicode must be an expert, and experts don't 
matter to you. Screw the people who have no interest in mathematics, and 
wouldn't know a square root symbol from a kick to the head. Those users 
don't count either. As for enormous number of users who will have 
difficulty typing √ in their source code, they certainly don't count! 
It's good enough that *you* have a solution to that problem, you can type 
alt-v, and anyone who can't simply doesn't matter.


-- 
Steven D'Aprano
http://import-that.dreamwidth.org/



More information about the Python-list mailing list