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
Sat Apr 5 02:48:22 EDT 2014


On 4/5/14 1:01 AM, Ben Finney wrote:
> Mark H Harris <harrismh777 at gmail.com> writes:
>
>> On 4/5/14 12:02 AM, Ian Kelly wrote:
>>> A fork is undesirable because it fragments the community.  I don't
>>> think "fear" or "panic" are the right words for it.
>>
>>     Yes. I get that.
>
> So, you get that “fear” and “panic” are not the right words to
> characterise the undesirability Ian describes.

    Not so much. I 'get' his point about community fragmentation. I 
disagree that 'fear' is not the correct word. Its semantics, really, but 
the root is 'fear' of community fragmentation. This is something less 
than 'fear' as in terror, or fear as in irrational, or fear as in 
childish (or something like that).

> Did you use those words anyway, despite knowing they're not the right
> words to use?

    Often decisions are made within tension (fear) that the price of 
consequences will not warrant the effort, nor heroism. I believe that 
decisions should be made because "its the right thing to do," and not 
because, "if we force this too soon there will be a fork," kinda thing. 
Decision out of fear is not good. Conservative posturing within tension 
might be good, as long as its not carried out too far.

> Or did you think they were the right words to use, and now you've
> changed your position? I don't see where that happened, so I'm confused.

    You might be confused because you expect me to have a position. My 
opinions are often also floating on a continuum (just like everything 
else).  I try to keep an open mind, consider all views, allow for the 
fact that I'm constantly learning and don't know everything, humble 
enough to know that others can teach me, and above all else willing to 
hold "truth" gently and humbly.

> Or do you still think they are the correct words to use, but now wish to
> distance yourself from that position?

    In Ian's case he may, in point of fact, be concerned for the 
fragmentation of the community and he might not be fearful; in which 
case fear would not be the right word for his concern. On the other 
hand, in point of fact, if Ian (or anyone else) fears the fragmentation 
of the community that he sees as the consequence of forking C python, 
then 'fear' would be the right word to use. Just say'n.
    I don't really have a position (as it were) to distance myself from, 
but I do have a concern about the perceived awkward conservative snail 
pace with regard to C python 3.x migration. I mean, its not about being 
slothful (nor anything like that) but it appears to be 'concern' for 
constituents (of one kind and another). That 'appearance' is in my view 
the 'fear' of consequence with a too-quick migration plan (its been way 
drawn out so far).
    I personally want python 3.3+ on my android devices. Well, QPython 
is stuck on 2.7.2 because why? Twisted does not fully work on 3.x yet. 
What's the solution? Get Twisted up to speed. (gevent is similar).
    Now, I don't think QPython will want to maintain a fork. I also 
don't think they will want to stay on 2.7.2 forever, because they will 
want security patches. They will eventually get up to speed when Twisted 
is ready. What I wish the C python community would do is to apply just a 
little pressure here so that the Twisted community is motivated to move 
a little faster.  This is taking too long, and yes, I think the core 
devs are afraid of offending (or fragmenting) constituents.  I might be 
wrong.

> This may seem trivial, but I'm trying to get a handle on what it is you
> mean to communicate, when your stated position in one message conflicts
> with your stated position only a few messages earlier.

    Very seldom is anything black & white. Always we entertain shades of 
grey and a panacea of color and multiple hues. Sometimes when we are 
thinking out loud (which is itself more than vulnerable) we may be 
interpreted as being contradictory. Often the contradiction is more or 
less a nuance as we're wrestling with our mental heuristics. Often my 
categories overlap, and sometimes those categories have weights that 
shift (or morph) as the discussion continues. Never are we thinking in a 
vacuum, and always we are being influenced and challenged by others 
viewpoints and nuanced opinions. *What position?*  Its a little like 
quantum mechanics and the Heisenberg uncertainty principle--- the more 
you know about my position, the less you know about how I arrived at it; 
and the more you know about how I arrived at my position the less you 
will know about the locus of the position itself.

    Of course, being able to parse intention with nothing to go on 
except typed English words and without non verbals (oh the pain of it 
all) is at best a quandary fraught with foil and frustration; but none 
the less we persist.  {shrug}


marcus




More information about the Python-list mailing list