Given a string - execute a function by the same name
python at bdurham.com
python at bdurham.com
Tue Apr 29 13:40:11 EDT 2008
Erik,
> Perhaps I missed something earlier in the thread, but I really don't see the need for that registry dict or the register decorator. Python already
maintains a dictionary for each scope:
The advantage of the decorator technique is that you explicitly declare
which functions are eligible for execution.
Using locals() is too broad because it might allow a user to execute an
unintended function.
Malcolm
More information about the Python-list
mailing list