[Python-Dev] Lockstep iteration - eureka! (original) (raw)

Peter Schneider-Kamp nowonder@nowonder.de
Mon, 14 Aug 2000 21:12:03 +0000


Tim Peters wrote:

But if you add seq.items(), you had better add seq.keys() too, and seq.values() as a synonym for seq[:]. I guess the perceived advantage of adding seq.items() is that it supplies yet another incredibly slow and convoluted way to get at the for-loop index? "Ah, that's the ticket! Let's allocate gazillabytes of storage and compute all the indexes into a massive data structure up front, and then we can use the loop index that's already sitting there for free anyway to index into that and get back a redundant copy of itself!" .

That's a -1, right? <0.1 wink>

Peter

Peter Schneider-Kamp ++47-7388-7331 Herman Krags veg 51-11 mailto:peter@schneider-kamp.de N-7050 Trondheim http://schneider-kamp.de