super question

Jp Calderone exarkun at intarweb.us
Mon Apr 7 15:09:24 EDT 2003


On Mon, Apr 07, 2003 at 11:56:42AM -0700, Danra wrote:
> [snip]
>
> TypeError: super() argument 1 must be type, not classobj
> 
> What am I doing wrong?
> 

  super() works on type objects, but what you have above are classic class
objects.

    class B(object):
        pass

    class C(B):
        pass

    super(C)  # <super: <class 'C'>, NULL>

  Jp

-- 
Examinations are formidable even to the best prepared, for
even the greatest fool may ask more the the wisest man can answer.
                -- C.C. Colton
-- 
 up 18 days, 15:01, 12 users, load average: 0.12, 0.09, 0.06





More information about the Python-list mailing list