introspecting builtin functions/methods

Jp Calderone exarkun at intarweb.us
Tue Dec 16 16:58:20 CET 2003


On Tue, Dec 16, 2003 at 03:56:45PM +0000, Gon?alo Rodrigues wrote:
> Hi,
> 
> Does anyone know if and how I can, from within Python, read the
> signatures of builtin methods/functions?
> 

  The signatures for builtins are not available via any of the normal
introspection routines.  The way argument parsing works in C makes it so
that the expected arguments are not available anywhere (typically) except as
a string literal inside the function definition.

  It would be pretty handy if this information was available, but I think
converting the existing code to make it available would be a herculean
effort.

  Jp





More information about the Python-list mailing list