Class variable inheritance

Carl Banks pavlovevidence at gmail.com
Wed Sep 9 02:40:07 EDT 2009


On Sep 8, 8:51 pm, HPJ <henrypija... at gmail.com> wrote:
> > Conceptually, Python checks for the presence of B.foo, and if it's
> > not there it checks for foo's presence in the base classes.
>
> Yes, I have no problem believing you guys that this is what Python
> does. Still, my question remains about where in the Language Reference
> this is specified. And if the answer is nowhere, than the LR needs to
> be amended, for obviously the way inheritance is done is no small
> matter and its understanding should not be left to the user's own
> intuition.

Well, I don't know if this detail alone is all that grave an omission--
it'll matter to very few users--but it does seem the LRM could use a
subsection on inheritance in general.  I'm sure the doc maintainers
would welcome a contribution.

Carl Banks



More information about the Python-list mailing list