static variables?
Syver Enstad
syver-en+usenet at online.no
Tue Nov 19 13:30:13 EST 2002
"Josh" <jslmaslk at earthlink.net> writes:
> Hi guys,
>
> I am a python newbie, and I am sure there is an easy answer but, Is
> there
>
> any equivalent to C's static variables in Python? If not, how can you
> have
>
> variables inside a function, that 'remember' their values between
> function
>
> calls?
Use a class. I know that is not the direct answer to your question,
but anyway, use a class.
--
Vennlig hilsen
Syver Enstad
More information about the Python-list
mailing list