iters on ints? (reducing the need for range/xrange)
Luigi Ballabio
ballabio at mac.com
Fri Nov 9 11:24:30 EST 2001
At 02:08 PM 11/9/01 +0000, Rainer Deyke wrote:
>"Luigi Ballabio" <ballabio at mac.com> wrote in message
>news:mailman.1005305487.25887.python-list at python.org...
> > This said, while it makes sense in english to say "do this for every line
> > IN this file", it just doesn't sound right to me to say "do this for every
> > number IN 10"---even though I've been once familiar with the definitions
> > of the set of all integers.
>
>I consider that a fairly weak argument. Programming languages should be
>simple, internally consistent, fairly easy to learn, well defined, and able
>to express programs with minimum redundacy.
Let me rephrase that without the "english" part.
"for line in file" maps exactly the language-independent representation of
the process which I form in my mind, which makes such expression simple,
consistent, easy to learn and all that.
"for i in 10" doesn't map any of my representations of an enumeration up to
10, much less one from 0 to 9.
>English is none of these, so English should not be used a basis for
>creating a programming language.
You don't have to tell me that. I'm Italian :)
Bye,
Luigi
More information about the Python-list
mailing list