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

Chris Angelico rosuav at gmail.com
Sat Apr 5 03:08:33 EDT 2014


On Sat, Apr 5, 2014 at 5:48 PM, Mark H Harris <harrismh777 at gmail.com> wrote:
> 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).

In that case, don't quote both sentences and say "I get that", because
people will interpret that to mean that you "get" both of them. You do
have the power to edit quoted text and insert your responses in the
exact right places.

>    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.

I avoid stepping out onto the road in front of a truck, out of fear
that the truck will hit me and break the screen on my laptop. (And
secondarily, because getting hit will hurt. Priorities.) Is that a bad
decision? At what point does something stop being "conservative
posturing" or sane decision-making and start being a "decision out of
fear"?

>    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.

Why 2.7.2? That can't be because of Twisted. There must be some other
reason for not upgrading within 2.7.

>    Very seldom is anything black & white. Always we entertain shades of grey
> and a panacea of color and multiple hues.

(You may mean a "rainbow" of color or something, but not a "panacea",
which is a quite different thing. According to the Baroness von
Krakenfeldt, old wine is a panacea - as long as someone else pays the
bill.)

And yet ultimately, many things *are* black and white. There is truth,
and there is falsehood. Something may be accurate to a greater or
lesser degree (if I say that the human body is "mostly" water, then
I'm correct; if I say the human body is "about 60% water" then I'm
more correct, but if I say the human body is "95.2423% water", then
I'm flat out wrong), but correctness is absolute. It's impossible to
conduct a sane debate if those participating do not at least attempt
to maintain a position, and acknowledge when that position changes.
There's nothing wrong with shifting, if done graciously and without
trying to pretend that you haven't shifted. (After all, that's usually
the point of a debate - to have two extreme positions progressively
clarified and shifted until they come into agreement.)

ChrisA



More information about the Python-list mailing list