[Python-ideas] List Revolution
Guido van Rossum
guido at python.org
Sun Sep 11 03:40:30 CEST 2011
On Sat, Sep 10, 2011 at 6:26 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Carl Matthew Johnson wrote:
>> The reasoning in this letter is so terrible... "We should start lists at 0
>> because when writing for-loops the <= look goofy otherwise." Why on earth
>> should Pythonistas care what the for-loops are like when we only have
>> for-each loops! It's crazy.
> Um... have you actually read that article? He doesn't mention "for loops" at
> all, or any other kind of loop, for that matter. Neither does he say
> anything about the appearance of the comparison operators.
> He does talk about the values of the range endpoints, and mentions notations
> for ranges and array lower bounds in various languages. Python has equivalents
> of those -- sequence indexes, range() parameters, slice indexes, etc. Most
> of what he says applies perfectly well to Python.
EWD points out the power of half-open intervals, which I independently
discovered when I considered the issue of indexing and slicing in
Python. If you consider that arcane mathematics I'm not sure I really
want to use any code you wrote...
--Guido van Rossum (python.org/~guido)
More information about the Python-ideas