[Tutor] Data persistence problem

Jim Mooney cybervigilante at gmail.com
Fri Jun 21 19:44:19 CEST 2013


On 21 June 2013 00:06, Alan Gauld <alan.gauld at 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.


More information about the Tutor mailing list