I get this error:
TypeError: object.__init__() takes no parameters
when running my code, I don’t really see what I’m doing wrong here though:
class IRCReplyModule(object):
activated=True
moduleHandlerResultList=None
moduleHandlerCommandlist=None
modulename=""
def __init__(self,modulename):
self.modulename = modulename
class SimpleHelloWorld(IRCReplyModule):
def __init__(self):
super(IRCReplyModule,self).__init__('hello world')
You are calling the wrong class name in your super() call:
Essentially what you are resolving to is the
__init__of the object base class which takes no params.Its a bit redundant, I know, to have to specify the class that you are already inside of, which is why in python3 you can just do:
super().__init__()