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:09:38 EDT 2014


On 4/3/14 5:43 PM, Chris Angelico wrote:

> So your definition of "useful" for the Decimal module is "fast" and
> your definition of "useful" for Unicode is "mandated into use".

    No. I did not define 'useful'.  I placed 'useful' on a continuum 
whereby 'useful' is non definitive & relative. Go read it again. Decimal 
became practical (due to performance enhancement) and therefore 'bumped 
up' on the 'useful' continuum. Unicode in python3 is more 'useful' than 
in python2; yet, useful for a given purpose in *both* (based on user 
preference and "suitability for a particular purpose")

    One of the reasons that many of us include a boiler plate legal 
disclaimer about useability in our open source is that "suitable for a 
particular purpose", ehem 'useful,' is entirely in the eye(s) of the 
beholder.

> Python is
> useful in that I am able to wield it to solve my problems.

    Python is 'useful' because I am able to solve my computational 
problems with it. Python3 is *more* 'useful' than Python2 for my 
purposes of computability and computational problem solving--- don't 
look for it in the dictionary.  'Useful' is as 'useful' does. 'Useful' 
is as I perceive it.  'Useful' is also as you perceive it.
    Immanuel kant said, "Perception is reality". 'Useful' is perceived 
reality--- a continuum between to extremes--- useless on the one hand, 
and flexible and all-powerful on the other.
    Oh, and by the by, my perceived continuum will 'look' different than 
your perceived continuum. In fact, they might be overlapping but 
probably will be non intersecting (all depending upon our own perceptions).

marcus




More information about the Python-list mailing list