How to create functors?
Thu Aug 20 03:42:32 CEST 2009
Robert Dailey <rcdailey at 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. As a few other people have explained,
"print" in python 2.x is a statement rather than a function. You could
use sys.stdout.write instead of print.
More information about the Python-list