[Python-Dev] Re: indexing, indices(), irange(), list.items()
Ka-Ping Yee
ping@lfw.org
Fri, 18 Aug 2000 23:38:10 -0700 (PDT)
On Fri, 18 Aug 2000, Fred L. Drake, Jr. wrote:
> I hadn't considered *not* using an "in" clause, but that is actually
> pretty neat. I'd like to see all of these allowed; disallowing "for i
> indexing e in ...:" reduces the intended functionality substantially.
I like them all as well (and had previously assumed that the "indexing"
proposal included the "for i indexing sequence" case!).
While we're sounding off on the issue, i'm quite happy (+1) on both of:
for el in seq:
for i indexing seq:
for i indexing el in seq:
and
for el in seq:
for i in indices(seq):
for i, el in irange(seq):
with a slight preference for the former.
-- ?!ng