[Python-Dev] Re: Class/type dichotomy thoughts
Sun, 5 Nov 2000 23:44:53 -0800
On Mon, Nov 06, 2000 at 01:25:26PM +0100, M.-A. Lemburg wrote:
> I think the problem we currently have with subclassing types
> is strongly related to the fact that all Py<type>_Check()
> macros only work on a address compare basis.
I don't think this is the problem, although it is closely
related. The problem is that the interpreter uses these type
checks to special case the handling of certain types.
PyInstance_Check() is a big offender.
Behavior should be based solely on the type structure. Extension
types would then be able to behave exactly like any other builtin
type. Your coercion proposal and David's rich comparisions both
remove some of this special casing based on type.