[Tutor] Re: If not global, how?

BW Glitch bwglitch@hotpop.com
Fri Apr 4 21:14:02 2003


On 12:00 PM 3/31/2003 -0500, tutor-request@python.org feed this fish to the 
sharks:
>In the app that I am developing, I have some callbacks
>that need data from other methods. I am trying to
>figure out how to make that data available without
>making it global. Here is an example:
>
>This class is instantiated.
>[snip]

I don't know if it may be possible, but calling something like:

callback(lambda: myFunction(value))

Might work. I haven't worked enough with the lambda to know if this is 
possible, but I've done it the other way around.

Can someone correct me?


-- 
Andres Rosado
Email: andresr@despammed.com
ICQ: 66750646
Homepage: http://andres980.tripod.com/
Get my PGP key at http://andres980.tripod.com/pgp-key.asc

To find fault is easy; to do better may be difficult.
                 -- Plutarch