On Mon, Oct 5, 2009 at 7:56 PM, menomnon <p...@well.com> wrote: > Does python have a ‘once’ (per class) feature?
In Python, `class` is an executable statement, so you can put whatever code you want in the class body (along with your method definitions) and it will be run exactly once, at the time the class is defined (that is, when the `class` statement is encountered by the interpreter). In this way, you could create class variables containing such static information. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list