Function pointers in Python?

Richard Harvey tririch at connect.net
Tue Sep 12 22:33:49 CEST 2000


I know there is no direct correlation to C function pointers in Python, but
I'm curious if I can pull of a similar effect. I'm wanting to define a
dictionary that pairs a value with a Python function. If I'm provided the
value, I would find the matching dictionary entry and then call the Python
function that was paired with the value.  If there is a way to do this, how
would I assign the function name into the dictionary, and how should I
retrieve the function and call it from the dictionary?

Rich






More information about the Python-list mailing list