I'd like to subclass an existing scons class (named SConsEnvironment
) which has the following __init__
prototype:
def __init__(self,
platform=None,
tools=None,
toolpath=None,
variables=None,
parse_flags = None,
**kw):
In my own class Environment
, which derives from SConsEnvironment
, I tried to do:
def __init__(self,
platform=None,
tools=None,
toolpath=None,
variables=None,
parse_flags = None,
**kw):
if ('ENV' not in kw):
kw['ENV'] = os.environ.copy()
super(EIDEnvironment, self).__init__(
platform,
tools,
toolpath,
variables,
parse_flags,
kw) //Error here
Python complains:
TypeError: __init__() takes at most 6 arguments (7 given):
Unless I don't know how to count anymore, it seems that both __init__
functions take 7 arguments. I'm sure there is a good reason for this not to work, but what is it and how can I solve this ?