Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)
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:
More about localisation:
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-
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
> 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
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:
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:
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%.
Some other points to consider:
44% of WordPress sites are non-English:
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%)
More information about the Python-list