Class/type unification and reference to unbound methods
Aahz Maruch
aahz at panix.com
Sun May 13 11:00:02 EDT 2001
In article <mailman.989574504.17088.python-list at python.org>,
Christian Tanzer <tanzer at tttech.com> wrote:
>
>I sometimes refer to superclasses' methods in the class body as in:
>
> class A:
> def spam(self):
> ...
>
> class B(A):
> def spam(self):
> ...
>
> class C(A):
> def spam(self):
> ...
>
> class D(B, C):
> spam = C.spam
>
>This is akin to feature renaming as supported by Eiffel and comes in
>handy when one class is found in the inheritance chain repeatedly.
>Such renaming also is useful with extensive use of mixins.
FYI, this has been part of the python-dev discussion. I shan't say more
than that because I don't understand it. ;-)
--
--- Aahz <*> (Copyright 2001 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het Pythonista http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"I am not a helpless chained naked virgin who is going to be eaten by the
dragon; I am a sexually mature feline-type-dragon who has chosen to live
with the dragon." --SJM
More information about the Python-list
mailing list