Callbacks and "callable" objects

Christian Tismer tismer at appliedbiometrics.com
Thu Apr 22 14:11:00 EDT 1999


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




More information about the Python-list mailing list