
... DEFERRED(PyObject_GenericGetAttr), /*tp_getattro*/
[NealN]
I agree, this makes sense. The only problem is that the functions/methods will have to be specified twice. It would be nice if we only had to specify each once. Any ideas?
None beyond not making A Project out of it -- tricks with the C preprocessor are usually worse than the diseases they're trying to cure, so KISS.
There are several places this has already been done (and at least one more coming). Do you want a global Py_DEFERRED() or some other name?
Py_DEFERRED would be fine. So would a pile of local DEFERREDs: a trivial one-line one-token macro that can't be screwed up isn't really aching for generalization or factorization, although it may be nice to have a longer comment explaining the need for it in just one place.