On Sat, Sep 20, 2014 at 8:02 AM, Terry Reedy <tjre...@udel.edu> wrote: >> That's what you're iterating over - not the bag itself. > > If one iterates over anything other that a sequence, in forward order, then > one is, in effect, iterating over a new sequence generated from the 'base' > collection. In particular, set and dict iteration iterates over an > arbitrary serialization of the set or dict.
Yeah, that's basically what I was trying to say. Didn't realize how empty the statement was till you dug deeper into it, heh. Yes, an iterator yields the items it yields, in the order it yields them... *twiddles thumbs* ChrisA -- https://mail.python.org/mailman/listinfo/python-list