For some reason, I am having problems with my head around __init__ and __new__ . I have a bunch of code that works fine with the terminal, but when I load it as a plugin for the Google Quick Search Box, I get a TypeError: default __new__ takes no parameters error message.
I read about the error, and it somehow made my brain spin. At its core, I have 3 classes, without subclasses, each class has its own def s. I never use def __init__ or def __new__ , but I realized that these are functions (or their absence) that will give me an error.
I have no idea how to sum the code up to the snippet, which will be useful here, since I'm a little over the head, but the whole script can be found on github . Not expecting anyone to correct my code for me, I'm just on that mind. Simple (plain English, not a quote from python docs that I read 20 times and still don't quite understand), an explanation of why this error __new__ or why I should or should not, using __init__ and / or __new__ would be seriously appreciated.
source share