[Python-3000] Traits/roles instead of ABCs

Bill Janssen janssen at parc.com
Mon Apr 30 23:15:02 CEST 2007

> > If we simply had a small standard extensible set of APIs, and a way to
> > indicate that a value does or doesn't support one or more of them,
> > we'd be done.  We could either add a new mechanism to do this, or simply
> > actually use the one we already have, which should work perfectly well for
> > this purpose.
> And which has been around for many years, but has never actually been
> used in practice (unlike, say, interfaces). Does this not say
> something?


Actually, it hasn't been around in workable form for years.  I'm not
sure of the actual chronology, but it wasn't really workable till 2.3,
with reasonable unification of built-in and user-defined types, and
the ability to subclass basic types like "dict".  So there are lots of
existing kludges that try to get around older limitations (like
interfaces).  The existence of these kludges is a symptom, not a fix.


More information about the Python-3000 mailing list