[Python-ideas] List Revolution
David Blaschke
dwblas at gmail.com
Fri Sep 9 23:42:09 CEST 2011
On Fri, Sep 9, 2011 at 2:12 PM, Christopher King <g.nius.ck at gmail.com> wrote:
> The first element in a list is element zero, the second is one, the third it
> two, and so on.
Those are not element numbers, but offsets. What is confusing is
calling them element numbers. Back in the days of dinosaurs, you
would write the access to containers yourself, so you if you wanted to
access the first element, the memory offset is zero from the
beginning. If you want the second element the memory offset is 1 X
length of element from the beginning, etc. This has carried forward
as languages have moved forward. A dictionary would be the choice for
indexing by 1, 2, 3, etc.
--
Unless your heart is open and serene, with nothing touching your
feelings, how can you respond completely without error,,,,,Yuanwu
More information about the Python-ideas
mailing list