[Python-Dev] type categories
Barry A. Warsaw
Mon, 26 Aug 2002 11:29:55 -0400
>>>>> "SP" == Samuele Pedroni <firstname.lastname@example.org> writes:
SP> One exception being to able to declare conformance to an
SP> interface after-the-fact in some sweet way.
This is a very important use case, IMO.
I'm leary of trying to weave some interface taxonomy into the standard
library and types without having a lot of experience in using this for
real world applications. Even then, it's possible <wink> that there
will be a lot of disagreement on the shape of the type hierarchy.
So one strategy would be to not classify the existing types and
classes ahead of time, but to provide a way for an application to
declare conformance to existing types in a way that makes sense for
the application (or library). The downside of this is that it may
lead to a raft of incompatible interface declarations, but I also
think that eventually we'd see convergence as we gain more experience.
My guess would be that of all the interfaces that get defined and used
in the Python community, on a few that are commonly agreed on or
become ubiquitous idioms will migrate into the core. I don't think we
need to solve this "problem" for the core types right away. Let's
start by providing mechanism and not policy.