[Python-Dev] Re: indexing, indices(), irange(), list.items() (was RE: [Python-Dev] Lockstep iteration (original) (raw)
Fred L. Drake, Jr. fdrake@beopen.com
Fri, 18 Aug 2000 10:21:20 -0400 (EDT)
- Previous message: [Python-Dev] Re: indexing, indices(), irange(), list.items() (was RE: [Python-Dev] Lockstep iteration - eureka!)
- Next message: [Python-Dev] Re: indexing, indices(), irange(), list.items()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Peter Schneider-Kamp writes:
What about 'indexing' xor 'in' ? Like that:
for i indexing sequence: # good for e in sequence: # good for i indexing e in sequence: # BAD!
This might help Guido to understand what it does in the 'indexing' case. I admit that the third one may be a bit harder to parse, so why not leave it out?
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.
-Fred
-- Fred L. Drake, Jr. BeOpen PythonLabs Team Member
- Previous message: [Python-Dev] Re: indexing, indices(), irange(), list.items() (was RE: [Python-Dev] Lockstep iteration - eureka!)
- Next message: [Python-Dev] Re: indexing, indices(), irange(), list.items()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]