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
Thu Apr 3 22:29:43 EDT 2014


On 4/3/14 9:07 PM, alex23 wrote:
> On 4/04/2014 2:38 AM, Mark H Harris wrote:
>> If I speak of the python community, and I rarely do
>
> Maybe you speak "of" them rarely but you claim to speak "for" them
> fairly often.

    I am sorry, and I do apologize (genuinely). I knowingly speak for my 
users, because I have their input (positive and negative) and because I 
have a list of likes|dislikes.
    I don't knowingly speak 'for' the python community; except that I 
can see that speaking about|for 'python' the interpreter might get 
interpreted as speaking of|for the 'python community'.  If that occurs I 
assure you that its not intentional (mostly).

>>     Python3 is not perfect; but python3 is *way* more consistent than
>> python2 and consequently *way* more useful than python2.

> It's possible for something to become "more useful" and for the original
> to *also* be useful: Py2 old-style classes were useful even though
> new-style classes were more so. Plone uses Py2's unicode extensively and
> at no point have I thought it "useless".

    Oh, I agree. Again, think of 'useful' on a continuum where 
comparison and contrast is king and queen, and where 'more useful' does 
not make 'less useful' obsolete. Again, prior to the C accelerated 
decimal module for python3.3 I did not use decimal (too slow). That does 
not mean that decimal was 'useless' (I am using it on 2.7.2 with QPython 
on Android with pdeclib). But something happened, decimal became fast 
enough that it is truly 'useful' enough (on the continuum) to be used 
IMHO as default. (that is all rhetorical; no need to argue it)

    Now, about Python2.  It has not died.  It appears to be 'useful'. 
The perceived reality is that Python2 is 'useful'.  Or, is it as I 
perceive it, python2 is embedded in so many places that it must be 
maintained for a long time because so many code(s) will break otherwise?
Not so much 'useful' as 'used,' so that it is never sacked.
Or, is it really that python2 is so much more 'suitable for a particular 
purpose' ('useful') that certain folks just don't want to use python3? 
Beats me; the community will have to decide.

marcus






More information about the Python-list mailing list