Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)
rosuav at gmail.com
Sat Mar 29 05:48:42 CET 2014
On Sat, Mar 29, 2014 at 3:07 PM, Mark H Harris <harrismh777 at gmail.com> wrote:
> You think ~sooo three dimensionally.
Yeah Doc, I have a real problem with that. -- Marty McFly
> Picture this ~a unicode keyboard with morphing keytops (digital ink, light
> emitting); a standard layout of keys that are touch sensitive, are meta
> operative, and are able to input *every* language on earth (as well any
> symbol). The keyboard may emit light, but not necessarily. The keys may be
> raised, but not necessarily; they have a glassy feel, soft, sensual, and
> completely programmable. Code point pages (key top mappings literally) are
> selectable on|off screen. The keyboard is obviously wireless, and the entire
> keytopsection is mouse-able; the whole keyboard is a pinting device, with
> diff sections for scrolling &c.
> This keyboard will be standard in about 25 years... none exist today.
Wrong. You just have to be willing to pay for it.
Or you could just get a blank keytops keyboard and reprogram it how
you like. But hey, have you noticed something? NOT ONE of these ideas
actually makes it easy to write Python code with occasional non-ASCII
characters in it. Switching keyboard mode for a single character is
horribly inefficient, especially if you have to remember a whole lot
of different modes for different characters ("lambda is
meta-butterfly-greek L meta-ctrl-space, and equality is
meta-mathematics 5 meta-ctrl-space"). Putting everything onto a single
keyboard is unworkable. Requiring you to press long key sequences to
generate single characters is useless. (You may as well just press
L-A-M-B-D-A and have it come out as "lambda".) Even with an ideal
keyboard, the creature of your fancies, you won't get past that, for
the same reason that we have keyboards that type letters rather than
More information about the Python-list