Static Variables

Aahz aahz at pythoncraft.com
Wed Apr 3 18:54:01 EST 2002


In article <a8dt35$a2i$1 at slb2.atl.mindspring.net>,
Jim Jacobs <jim.jacobs at jacobshome.com> wrote:
>
>Is it possible to simulate "C" style static variables in functions?  In
>methods?

I see that nobody has mentioned the most Pythonic way of all: create a
module called static.py.  (That's assuming you want a global static
variable, of course.)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list