[Python-Dev] Classes and Metaclasses in Smalltalk
Donald Beaudry
Donald Beaudry <donb@abinitio.com>
Thu, 03 May 2001 12:47:29 -0400
"Tim Peters" <tim.one@home.com> wrote,
> Given that we're using Python's search rules, the ambiguous point remaining
> is whether:
>
> super.f()
>
> textually contained in a method of class K begins searching with:
>
> 1) K.__bases__
>
> or with:
>
> 2) self.__class__.__bases__
It can only be 1. The using 2 will only be correct if you are in a
method defined on a leaf class. If not in a leaf, the search will
find the method you are already in... recursion is likely to terminate
in a stack overflow ;)
--
Donald Beaudry Ab Initio Software Corp.
201 Spring Street
donb@init.com Lexington, MA 02421
...So much code, so little time...