Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

Chris Angelico rosuav at gmail.com
Sun Apr 6 14:46:54 EDT 2014


On Mon, Apr 7, 2014 at 4:13 AM, Rustom Mody <rustompmody at gmail.com> wrote:
> Is the diff between cvs/svn and git "just one vcs or another"?

The theory of version control, or source control, or whatever you want
to call it, can be found in some of the docs for those systems (git
goes into some depth about the Directed Acyclic Graph that underpins
everything), but that theory isn't what makes git or cvs/svn useful.

The theory behind my MUD client "Gypsum" is that it should be built
the way a server is, including that it should not need to be restarted
even when there's new code to be loaded in; but that's not what makes
Gypsum useful.

The theory behind an ergonomic keyboard is that it should hurt your
hands less than a classic keyboard does, but that's not what makes it
useful. Actually, in that instance, it might be what makes it
useless...

>> Using Python at the design stage would be what Steven's talking about
>> - actually using it to build the theory of programming. I have about
>> as much experience in the area as he has, so we can't speak to the
>> lack of examples, but that's the sort of example it would take.
>
> !Parse Error! What are you saying -- I don get :-)

What I'm saying is that I - and, if my reading is correct, similarly
with Steven - am looking for is a prominent example of someone using
Python as the very basis for a discussion on the future of computer
science *as a field*. So, not "here's what can be done with Python",
and not "here's something about hydraulics, with some Python code
showing how my theory adds up". If you're developing a cryptography
algorithm, it might well be convenient to support it with Python code
(although I mostly see reference implementations in C), but that's
still using Python as a tool, rather than as a language for
fundamental development of comp sci theories.

ChrisA



More information about the Python-list mailing list