Inheritance and Inner/Nested Classes

Peter Hansen peter at engcorp.com
Mon Jul 12 15:09:14 CEST 2004


Paul Morrow wrote:

> ######################################
> class Parent(object):
>     class Foo(object):
>         baz = 'hello from Parent.Foo'
> 
> class Child(Parent):
>     #Foo.baz = 'hello from Child.Foo'
>     pass

Here you want "Parent.Foo.bax = ..." instead.

What are you actually trying to do?  This is unusual code,
I think...

-Peter



More information about the Python-list mailing list