Function to execute only once

George Sakkis gsakkis at rutgers.edu
Fri Oct 14 17:42:29 EDT 2005


"snoe" <case.nelson at gmail.com> wrote:

> I've been seeing alot about decorators and closures lately and my
> initial thought was that this would be a good place to use them instead
> of wrapping it around a class. That was my initial thought :) What I
> came up with was this:

Apparently you're not the first to think of it:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/425445.

George





More information about the Python-list mailing list