Function returns a function

Paul Rubin http
Tue Sep 6 17:16:44 EDT 2005


James Stroud <jstroud at mbi.ucla.edu> writes:
> Any ideas on how to do this with a regular function, or is the way I've done 
> it the pythonic choice?

I think you're trying to do something like this:

    def FunctionMaker(avar, func, label):
       def callback():
          avar.set(label)
          func()
       return callback



More information about the Python-list mailing list