[Beginner] Calling a function by its name in a string
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

[Beginner] Calling a function by its name in a string

From: Tito <titogarcia_borra_esto@gmail.com>
Date: Wed Jul 27 2005 - 20:12:35 CEST

Hi all:

Is there a metalanguage capability in Python (I know there are many) to
call a function having its name in a string?

Something like:
__call__("foo")

instead of:
foo()

Regards,
Tito
Received on Thu Sep 29 17:11:45 2005