[Tutor] call a def/class by reference

DS ds-python-tutor at sidorof.com
Thu Sep 29 01:03:44 CEST 2005


Is it possible to call a function or class by reference, aside from
using an eval approach?

What I would like to do is have a loop that processes functions by:

    1.  gettting the input that consists of a function and its parameters,
    2.  determining if the function is on an approved function list,
    3.  executing the function
    4.  rinse, repeat.

I don't actually mind eval, but I would want to make sure I inspect
everything pretty thorougly before executing.

Thanks for any help you can give me.

ds


More information about the Tutor mailing list