introspection question: get return type
Bruno Desthuilliers
bruno.42.desthuilliers at websiteburo.invalid
Thu May 14 09:18:13 EDT 2009
flamz3d at gmail.com a écrit :
> Hello,
> I am wondering if it's possible to get the return value of a method
> *without* calling it
Getting the return *value* without calling the function ? heck, that
would be really helpful - we'd save quiet a lot on function call
overhead and function execution time !-)
> using introspection?
>
> something like this, suppose I want to know the type of the return
> value for the method "getsomething". Is it possible to get it without
> actually calling 'getsomething'?
Oh, you meant the "return type" ? Nope, no way. It just doesn't make
sense given Python's dynamic typing.
More information about the Python-list
mailing list