fromfunc functions

Chris cwitts at gmail.com
Wed Feb 13 12:33:40 EST 2008


On Feb 13, 5:51 pm, azrael <jura.gro... at gmail.com> wrote:
> I came across the fromfunc() function in numpy where you pass as an
> argument the name of a function as a string and also the atributes for
> the desired function.
>
> I find this extremly usefull and sexy. Can someone point me how write
> a function of such capabilities

getattr(object, 'function name')(*args)



More information about the Python-list mailing list