Confused about class behavior

Brett Lempereur a.lempereur
Sat Sep 16 19:46:40 CEST 2000

I think this is right, here's a little example i hope is correct

If you have created two instances of one class, if you change the master
without asigning something to the child, the child will always refer to the

So if you haven't actually set the color in class A or B it will always
refer to its parent class before it does anything.  If however you were to
do this in the class

class C:
    def __init__():
        color = "green"

You wouldn't have the problem of the global colour changes.  I think

Oh yeah, anybody know how to implement class inheritance in Python?

More information about the Python-list mailing list