On 7/27/05, Tito <[EMAIL PROTECTED]> wrote:
> 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()
> 

>>> def foo(): print "foobarred"
...
>>> foo()
foobarred
>>> eval("foo()")
foobarred
>>>

Peace
Bill Mill
bill.mill at gmail.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to