Re: inheritance with new-style classes - help

2005-05-06 Thread Terry Reedy
"Greg Copeland" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Okay, I have: [snip] >self._childAttrib = "child" ... > AttributeError: 'Child' object has no attribute '_childAttrib' x.__dict__ > {'_attrib': 'base'} > > What??! Where the heck did self._childAttrib go?

Re: inheritance with new-style classes - help

2005-05-06 Thread Greg Copeland
Doh! Child's __init__ was declared as __init(). Fixing that took care of it! Sorry for wasting the bandwidth! Cheers, Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: inheritance with new-style classes - help

2005-05-06 Thread Greg Copeland
BTW, this is on Python 2.3.4. -- http://mail.python.org/mailman/listinfo/python-list

inheritance with new-style classes - help

2005-05-06 Thread Greg Copeland
Okay, I have: class Base( object ): def __init__( self ): self._attrib = "base" print "Base" def real( self ): print "Base.real() is calling base.virtual()" self.virtual() def virtual( self ): print "Base virtual()" pass class Mothe