On Wed, 19 Aug 2009 18:42:32 -0700, Paul Rubin wrote: > Robert Dailey <rcdai...@gmail.com> writes: >> I want to simply wrap a function up into an object so it can be called >> with no parameters. > > Nitpick: what you are asking for is called a closure. "Functor" means > something completely different.
I'm glad somebody else noticed this. I would have said something about it myself, except I wasn't entirely sure my understanding of functor is correct. As near as I can tell, a functor is just an object which is callable like a function without actually being implemented as a function, e.g.: class Functor: def __call__(self): return None f = Functor() result = f() -- Steven -- http://mail.python.org/mailman/listinfo/python-list