How to create functors?
Paul Rubin
http
Wed Aug 19 21:42:32 EDT 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
mailing list