Re: problem calling parent's __init__ method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry Hill

    Re: problem calling parent's __init__ method

    On Thu, Aug 7, 2008 at 11:11 AM, Ryan Krauss <ryanlists@gmai l.comwrote:
    I am trying to call a parent's __init__ method from the child's:
    This works for me just fine:

    class InnerBlock(obje ct):
    def __init__(self, codelist, noout=False, **kwargs):
    self.codelist = codelist
    self.noout = noout

    class ArbitraryBlock( InnerBlock):
    def __init__(self, codelist, noout=False, **kwargs):
    InnerBlock.__in it__(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
Working...