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 18:22:45 CEST 2014


On Sun, 30 Mar 2014 01:22:55 -0500, Mark H Harris wrote:

> On 3/29/14 12:53 PM, Steven D'Aprano wrote:
>> People have had localised code pages, and localised keyboards to enter
>> characters in those code pages, for up to 30 years, if not longer.
> 
>     Nobody is arguing otherwise, Steven. 

It certainly seemed like you were.


> Having a code page for a local
> language is not the same thing as having software that supports your
> local language code page!

Of course they're not the same, but localised software does exist. You're 
making the mistake of thinking that because you only see English-language 
software, no other software exists. But you are an English-speaker in an 
English-speaking country, of course nearly all the software you see is 
written for English speakers.

But if you were in Spain, the software you buy would be in Spanish:

http://www.sevenforums.com/general-discussion/123741-changing-language-
localization.html

More about localisation:

http://blogs.msdn.com/b/oldnewthing/archive/2012/07/26/10333558.aspx

http://support.apple.com/kb/HT4239?viewlocale=fr_FR&locale=fr_FR



 Software and code pages improved over time,
> but international communication (which is what I'm talking about) has
> always been done in English, using ASCII. 

That's simply not correct. Even if we limit "always" to mean "since World 
War Two", it's still wrong. IBM was localising their computers for non-
English markets before ASCII even existed, "code pages" was an IBM 
technology invented for EBCDIC-using mainframes before there were ASCII-
using PCs.

What is true is that English is the primary lingua franca on the 
Internet. But it's not the only one, and there are plenty of places on 
the Internet where people discuss things in their own language.


> Well except when Guido brought
> the ABC stuff to the states back in the day and had no way to do that
> except to fly himself (and the tape) personally.
>>
>> In some of those cases, the localisation was done by companies like
>> IBM, Microsoft and Apple, realising that if they wanted to sell
>> computers outside of the US, they needed to supply computers that were
>> localised to their market.
> 
>     Unfortunately that happened way late. And even then, international
> communication was still done (and is still done) in English.

And French. And Spanish. And Chinese. If you trade with most of Africa, 
knowing Arabic or French will probably be more useful than knowing 
English.


> Only until
> very recently (see my post to Chris) has unicode improved to the point
> where international comm can occur reliably enough (input, font, code
> points) to allow comm in languages other than English.

Unicode has little to do with the ability to communicate in languages 
other than English. If you want to communicate in Greek, you don't need 
Unicode, you just need both parties to agree to use ISO-8859-7. If you 
want to communicate in Japanese, you could use Shift-JIS, or various 
others.

Where Unicode comes into it is when you want to manage *mixed* 
communication. There's no way for me to include your ISO-8859-7 Greek 
text in my Shift-JIS Japanese document. I can use one, or the other, but 
not both. But with Unicode, I can use them both.


[...]
>     My point exactly. With the advent of the Internet, almost *all* comm
> is English with minor notable exceptions in today's environment.

Not even close to "almost all". Barely half of the Internet is English. 
If you only look in the English-speaking corners of the Internet, it is 
hardly surprising that you only see people speaking English.


Even at the high-point, English was only 80% of the Internet, 20% (that's 
*one in five* websites) was non-English:

http://www.theatlantic.com/past/docs/issues/2000/11/wallraff3.htm

That was a decade ago, and as predicted, the percentage of the Internet 
which uses English has plummeted as more non-English speakers have got on 
the 'net. Today, only 56% of the Internet is English:

http://w3techs.com/technologies/overview/content_language/all

That figure is based on the one million most popular websites. If you 
include *all* websites, you'll find the English percentage is even lower, 
and quite likely under 50%.

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

Some other points to consider: 

44% of WordPress sites are non-English:

http://venturebeat.com/2013/07/27/19-percent-of-the-web-runs-on-wordpress/

which is representative of the broader Internet. And since 2001, while 
the use of English on the Internet grew by 281%, other languages have 
grown much faster: 

- Spanish (743%)
- Chinese (1,277%)
- Russian (1,826%)
- Arabic (2,501%)


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



More information about the Python-list mailing list