"Super()" confusion

Daniel Fetchinson fetchinson at googlemail.com
Mon Feb 9 20:34:05 EST 2009


>>>>Hello. I've been scouring the web looking for something to clear up a
>>>>little confusion about the use of "super()" but haven't found anything
>>>>that really helps. Here's my simple example:
>>>>
>>>> [snip]
>>>>
>>>>"super(Child,self).__init__(filePath)
>>>>TypeError: super() argument 1 must be type, not classobj"
>>>>
>>>>What have I done wrong? Thanks in advance for any help.
>>>
>>> Consider whether you really need to use super().
>>>
>>> http://fuhm.net/super-harmful/
>>
>>Did you actually read that article, understood it, went through the
>>tons of responses from python-dev team members, including Guido
>
> Yes.  Why the knee-jerk reaction?

Because throwing around that link carries about the same amount of
information as "perl is better than python", "my IDE is better than
yours", "vim rulez!", "emacs is cooler than vim", etc, etc.

> I simply pointed out a resource which
> might be helpful to someone trying to learn to use super.

It will certainly not be helpful to anyone trying to learn the usage
of super. The person who wrote that essay is simply misunderstanding
the concept, as has been explained countless times by the python dev
team. Hence, it only increases confusion, adds to the noise and
spreads false alarm.

Honestly, I don't understand how this thing got so much out of
control. If anyone starts an intelligent question or remark about
super, this essay is thrown in no matter what. Anyone can explain why?

Cheers,
Daniel

-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list