I'd like to write two generators: one is a min to max sequence number generator that
rolls over to min again once the max is reached. the other is a generator that cycles
through N (say, 12) labels. currently, i'm using these generators in nested loops like
this:
 
seq_numbers = genSeqNum(min,max)
for label in genLabel():
   for some_date in genDate(init):
      for i in xrange(0, LIMIT):
         print label, some_date, i, seq_numbers.next()
 
The problem I'm trying to solve is this:
when the seq_numbers generator rolls over, the label generator must be advanced
to the next one "in tandem". does anyone has any suggestion? thanks for any hepl!


Yahoo! Mail
Use Photomail to share photos without annoying attachments.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to