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[1] 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). [1] https://github.com/terrence2/melano _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com