"dmitrey" <[EMAIL PROTECTED]> writes:

> Thank you
> (however in MATLAB ischar is the same as isstr)

Right, sorry.

> but what if I don't know the name of module?
> I.e. I have
> 
> def myfunc(param): ...
> #where param can be both funcName or a function, and I want to obtain
> both name and func, something like
> if isinstance(param, basestring):
>    func, funcName = <something>, param
> else: func, funcName = param, param.__name__
> what should I type instead of <something>?

globals()[param] (I assume you don't want a local function, should one exist?)

'as
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to