Check for descriptors (in C)
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sun Jun 3 14:12:08 EDT 2007
For most types, there are macros like PyXxxx_Check and
PyXxxx_CheckExact. But not for descriptors, and I want to test if a
certain object is a descriptor or not. May I define
PyMethodDescr_Check, by example, along the lines of similar checks, or
the fact that they are not already defined implies that they should
not be tested that way?
My actual use case: I want to check if an object (instance of a class
that inherits from file) still uses the original write method or has
overriden it.
--
Gabriel Genellina
More information about the Python-list
mailing list