On 21 June 2013 00:06, Alan Gauld <alan.ga...@btinternet.com> wrote: > Or if you really don't like globals you could create > a generator function:
Similar problem, by coincidence. Except I need a generator in a function to increment a variable each time the function is called, instead of giving it the same value every time. So far I have a next(gen) as a parameter into the function but that's exactly not what I want - since I need to increment three different numbers that will persist in the function. I tried a few examples I saw but I keep getting the same number, so I'm doing something wrong -- Jim A pride of lions, a gaggle of geese, a pack of wolves, a sewer of bankers. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor