On Monday, August 22, 2016 at 6:12:50 PM UTC+2, Nils Bruin wrote: > > Perhaps it's cleaner to hand out iterator objects that are kept track of > in the relevant loop. That iterator would then just die whenever the frames > of a KeyboardInterrupt exception are discarded and the flawed state > wouldn't persist. >
IMHO iterators must not have global state, which is really just a corollary to "global variables are bad". In particular, iterating twice simultaneously should work. With the exception of input iterators of course, but iterating over a tree doesn't consume it. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.