[Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed) (original) (raw)

Christian Heimes lists at cheimes.de
Fri Jun 22 21:21:14 CEST 2012


Am 22.06.2012 20:52, schrieb Guido van Rossum:

(5) Too bad there's no proposal for adding signatures to builtin functions/methods, but understood.

Larry et al. did an experiment with a mutable signature attribute to PyCFunction. He immediately backed out and removed the attribute as I explained that it breaks isolation between subinterpreter instances.

The PEP is already complex enough and went to several incarnations. It was a wise decision to focus on the features that could be implemented before the first beta is released. Kudos for pulling it off, Larry!

Signatures for builtin functions should be handled by a new PEP. We need a way to extract or define the signatures (perhaps parse the C code and parse PyArg_* signatures) and a secure way to store the signature (perhaps implement the signature class in C?). That's a LOT of work.

Christian



More information about the Python-Dev mailing list