[Python-Dev] Callable, non-descriptor class attributes.
list-sink at trainedmonkeystudios.org
Sun Mar 13 00:42:49 CET 2011
On Sat, 2011-03-12 at 12:49 +1300, Greg Ewing wrote:
> Thomas Wouters wrote:
> > 2. Make CFunctions turn into methods in CPython (after a period of
> > warning about the impending change, obviously.) The actual *usecase* for
> > this is hard to envision
> While not necessary for the case being discussed here, this would
> be a big help for Pyrex and Cython, where currently some awkward
> things have to be done to get a Python class with methods implemented
> in C.
Just so. I implemented a new C-level function type for Melano just 2
days ago so that I can have the descriptor slot set (and get
__defaults__, __kw_defaults__, __annotations__, and any other missing
details from PyFunction that I want or need).
More information about the Python-Dev