problem calling parent's __init__ method
Jerry Hill
malaclypse2 at gmail.com
Thu Aug 7 11:26:46 EDT 2008
On Thu, Aug 7, 2008 at 11:11 AM, Ryan Krauss <ryanlists at gmail.com> wrote:
> I am trying to call a parent's __init__ method from the child's:
This works for me just fine:
class InnerBlock(object):
def __init__(self, codelist, noout=False, **kwargs):
self.codelist = codelist
self.noout = noout
class ArbitraryBlock(InnerBlock):
def __init__(self, codelist, noout=False, **kwargs):
InnerBlock.__init__(self, codelist, noout=noout, **kwargs)
ab = ArbitraryBlock('a, b, c')
That's using python 2.5.2 on Windows XP. What version of python are
you using? On what platform? Can you show us more of your code? Or
a complete self-contained example that shows the problem you are
seeing?
--
Jerry
More information about the Python-list
mailing list