Well, you don't have _popen in your class.
If _popen was declared at the class level or was a function in mp.Process, then your code will work because it will grab it from the Process namespace.
class Process(object): _popen = None def __init__(...):
The statement looks like a guard, and I guess the code looks something like this:
class Process(object): def __init__(...):
Now, in this case, _popen is installed only in the instance, and not in the Process class. But in order for it to be installed, you need to execute this mp.Process .__ init__ code.
Your code will work fine if you called the ".__ init__ Process", which you did not initially do.
Instead of using Super, you can call it
class My_Class(mp.Process): def __init__(self):
this is what i did and it works great. But it breaks if you change the inheritance to say My_Class (mp.AnotherProcessType). In this case, any calls to mp.Process.somefunc (), and not just __init__, must be adjusted manually.
super (My_Class, self) .init () ultimately does the same thing in this case, but is a more reliable way to do homework to call mp.Process .__ init __.
Sometimes you can refuse to call init for the ancestor of the Python class. But it all depends on whether there is an initialization code that needs to be run. And in this case, it seems that there is.
Also, if you did not have __init__ in your class, you also do not have to worry, mp.Process .__ init__ will be called automatically. But having your own __init__ basically says: "I will do my own initialization, thank you very much." It is up to your code to explicitly delegate some work back to the ancestor class, if necessary.
ps don't worry, I find super (xxx, self) .somefunc () a bit non-pythonic obscure. But it works.