On May 2, 12:43 pm, alex23 <wuwe...@gmail.com> wrote: > I'm not entirely sure what your 'solution' offers over something like: > > class FOO(object): > def __init__(self, fn): > self.fn = fn > > def __enter__(self): > return self.fn > > def __exit__(self, exc_type, exc_value, traceback): > pass > > def func(x, before_check=None, after_check=None, when_odd=None, > when_prime=None): > pass
Sorry, the func definition was meant to be: def func(x): # before_check, after_check, when_odd, when_prime used internally pass -- http://mail.python.org/mailman/listinfo/python-list