Opposite of repr() (kind of)

Guillermo guillermo.listas at googlemail.com
Mon Apr 21 07:57:00 EDT 2008


This must be the dumbest question ever...

Solved.

On Apr 21, 1:05 pm, Guillermo <guillermo.lis... at googlemail.com> wrote:
> Hi there,
>
> How can I turn a string into a callable object/function?
>
> I have a = 'len', and I want to do: if callable(eval(a)): print
> "callable", but that doesn't quite work the way I want. :)
>
> Regards,
>
> Guillermo




More information about the Python-list mailing list