From: tismer at appliedbiometrics.com (Christian Tismer)
Date: Thu, 22 Apr 1999 18:11:00 GMT
Subject: Callbacks and "callable" objects
References: <19990422113516.A278137@vislab.epa.gov>
Message-ID: <371F6634.3ED0FD11@appliedbiometrics.com>
Content-Length: 1122
X-UID: 372                                                  


Randall Hopper wrote:
> 
>      A while back I asked how to pass parameterized callbacks to Tkinter.
> Now I need to explore how best to do partial resolution of callback
> arguments.  For example, define values for arguments 1 and 2 at
> registration time, but leave argument 3 to be populated by Tkinter.

With a speed penalty of about a factor 2,
Don Beaudry's functor module provides you with the
partial closure functionality which you would like.
Please get the current version from ftp.python.org,
it works with Python 1.5 .

BTW, I think you will go back to the default parameter
trick after a while, since it is faster, which might be
an issue for callbacks.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.python.net
10553 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home




