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
Sun Mar 30 11:22:45 EDT 2014


On Sat, 29 Mar 2014 03:21:29 -0500, Mark H Harris wrote:

> On 3/29/14 1:03 AM, Chris Angelico wrote:
>>
>> http://forum.ecomstation.ru/
>>
>> Prominent discussion forum, although that strives to be at least
>> partially bilingual in deference to those of us who are so backward as
>> to speak only English.
> 
>     Yes. Well, as the joke goes, if you're trilingual you speak three
> languages, if you're bilingual you speak two languages, if you're
> monolingual you're an American (well, that might go for Australia too,
> maybe). When whole continents speak the same language that tends to
> happen.

I think that the Québécois and Mexicans might object to your 
characterisation of North America as speaking a single language.

English is the primary lingua franca in various fields, such as aviation, 
diplomacy, trade and, yes, computing. But it's not the only lingua franca 
in common use: French and Spanish are the second and third most common 
languages used in international trade, and Arabic, Mandarin, Cantonese, 
Russian, and many others remain important regional and international 
lingua francas:

https://en.wikipedia.org/wiki/List_of_lingua_francas

English currently is the dominant international language, but it is not 
the only such language, and it's dominance is not so complete that other 
languages are second-class. One need only look at your spam folder, and 
see how much spam is sent in Chinese, Russian and other languages to 
realise that English hasn't even come close to taking over the planet yet.

But none of which is really relevant to the question on hand. When people 
from France, Germany, Russia, Brazil and Japan get together on the 
Internet, they probably write English. When they are writing for 
themselves, they typically write in French, Germany, Russian, Brazilian 
Portuguese, and Japan.

http://blog.gmane.org/gmane.comp.python.brasil
http://blog.gmane.org/gmane.comp.accessibility.tanaguru
http://blog.gmane.org/gmane.comp.apache.discussion.russian

etc.


[...]
>     What I can tell you in my own experience, as an amateur radio
> operator (W0MHH, general class) who has communicated all over the earth
> (even to Soviet Russia), all my computer|radio comm was in English using
> Morse code sets, Latin characters, and ASCII.  No one ever asked me to
> comm in Russian, or French, nor Italian, nor Tswana...

Are you aware that the astronauts on the International Space Station have 
to be fluent in Russian? Hardly surprising, since the Soyuz rockets used 
to get to the ISS are made by Russians, maintained by Russians, and 
launched by Russians. All the controls and manuals are written in 
Russian. One might almost say that the lingua franca of space travel is 
Russian.

You're experience suggests that the lingua franca of the amateur radio 
community is English. If you wanted to be an astronaut, you'd need to 
learn Russian. (Although I wonder whether the Chinese agree about that.) 
Whenever you have people from a broad range of languages getting together 
and needing to communicate, they need to agree on a common tongue. Often 
that's English. Often it is not.

http://www.arabo.com/

(I searched for "python", and got three hits: one in English and two in 
French.)


> By the way, in my view, 1991 is very recently; 

In 1991, there was no wireless, no mobile computing, hardly any public 
Internet outside of the universities. It was before the Eternal 
September, and only a few years after the Great Renaming. Python had just 
been released for the first time, and Windows 3.1 hadn't been (although 
3.0 had). There was no Netscape, no Mosaic graphical web browsers. Steve 
Jobs hadn't returned to Apple yet, Apple was still losing money and mind-
share, and Google didn't even exist. It was a different era.

1991 is 23 years ago. In "computer years", I consider that almost eight 
generations, about the same as 160 years in human terms. 


> from a computer historical standpoint too. I mean, think
> about it, computers have only existed since late 1940s and only in their
> modern context since about 1989. I didn't really start using unicode
> until about 5 years ago; python has only really used it since python3.
> right?

No. Python 2.2 introduced Unicode.



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



More information about the Python-list mailing list