[Python-3000] Implementations: A syntax for extending method dispatching beyond type/class inheritance
jimjjewett at gmail.com
Mon Dec 4 18:16:19 CET 2006
On 12/3/06, Bill Janssen <janssen at parc.com> wrote:
> > Implementations are used to make Method Dispatching more flexible by
> > allowing a class to claim that it acts like another class/type even
> > though it is not derived from that class/type.
> I'm not sure just what this adds over the simple "change_class"
> function that I've posted twice already. Is there an implementation
> efficiency argument here?
(1) Interfaces can be placed on a separate (presumably light-weight)
(2) There is are efficiency (and security) concerns with changing
bases in an arbitrary manner. Changing them only at the back (where
they cannot hide existing attributes) may be safer and easier. (I'm
not certain of this; but I'm not ready to rule it out either.)
More information about the Python-3000