python for loop
pecora at anvil.nrl.navy.mil
Wed Apr 1 20:14:47 CEST 2009
In article <91t6t4hfjicgvdrcgkhdjfro3ko3ktum8l at 4ax.com>,
Lada Kugis <lada.kugis at gmail.com> wrote:
> On Wed, 1 Apr 2009 00:40:17 -0700 (PDT), Carl Banks
> <pavlovevidence at gmail.com> wrote:
> >I am also an engineer, and I can tell your idea of intuitive is not
> >universal, even among engineers. I certainly do not lean toward one-
> >based indexing.
> >From a programming standpoint--and remember Python is a programming
> >language--zero-based indexing eliminates the need for a whole lot of
> >extra +1s and -1s when indexing, slicing, and iterating, a lot more
> >than it causes, and that is worth the "cost". This might not be
> >apparent to you if you never tried seriously taking advantage of
> >indexing from zero, or if your programming experience is very narrow.
> >These both seem to be true for you, so you'll just have to take my
> >word for it.
> You have repeated several cs based points already stated. But apart
> from a programming standpoint - could you give a few examples, where
> "on paper" (as to avoid stepping into "programmer's territory") zero
> indexing could be more intuitive ?
This has become a moving target. I thought your original complaint was
about Python (the programming language) vs. Fortran (the programming
language) and C (the programming language used in an odd way).
-- Lou Pecora
More information about the Python-list