On Jul 29, 2:40 pm, kj <[EMAIL PROTECTED]> wrote: > Yet another noob question... > > Is there a way to mimic C's static variables in Python? Or something > like it? The idea is to equip a given function with a set of > constants that belong only to it, so as not to clutter the global > namespace with variables that are not needed elsewhere.
I'd go ahead and use globals. If these really are constant you should just name them clearly (and possibly use all caps). If they have a possibility of becoming non-constant in the future, write a class. No fancy tricks needed to store state. -- http://mail.python.org/mailman/listinfo/python-list