P
Pupeno
Hello,
I have a class called MyConfig, it is based on Python's
ConfigParser.ConfigParser.
It implements add_section(self, section), which is also implemented on
ConfigParser.ConfigParser, which I want to call.
So, reducing the problem to the bare minimum, the class (with a useless
add_section that shows the problem):
.... def add_section(self, section):
.... super(MyConfig, self).add_section(section)
....
Create an object
and call the problematic method:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
Why is super() requiring a type ? doesn't it work with classes ? Is there a
way to achieve what I am trying to do (other than calling the specific
class that happens to be the parent today) ?
Thanks.
I have a class called MyConfig, it is based on Python's
ConfigParser.ConfigParser.
It implements add_section(self, section), which is also implemented on
ConfigParser.ConfigParser, which I want to call.
So, reducing the problem to the bare minimum, the class (with a useless
add_section that shows the problem):
.... def add_section(self, section):
.... super(MyConfig, self).add_section(section)
....
Create an object
and call the problematic method:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
Why is super() requiring a type ? doesn't it work with classes ? Is there a
way to achieve what I am trying to do (other than calling the specific
class that happens to be the parent today) ?
Thanks.