Thank you, I have been through the tutorial several times, I guess I'm just not smart enough. Python is quite different from the languages I am familiar with.
My code sample started like this: >>for i in range(self.parent.GetPageCount()): I was asked: >Does page count change? i.e. is it necessary to retrieve it in every loop Is self.parent.GetPageCount() 'retrieved every loop'? Steve. "Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > bambam wrote: >> That is, is it defined what Python does for >> for i in f() >> I'm sure it must be, but I haven't seen it yet. If I have >> a user defined function returning a range, is it defined >> that the range function is called on every loop? If I >> have a function returning a range taking a parameter, >> for i in f(v) >> is it defined that the variable is evaluated for every loop? > > Nope. Take the tutorial. > > for i in f(v): > <suite> > is the same as: > iterator = iter(f(v)) > for i in iterator: > <suite> > > -Scott David Daniels > [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list