Calling @classmethod of abstract super class error -- Python -


I am trying to overwrite a classmath of the code given below, but getting the following error

  TypeError: should be type, not classobj  

Why is this happening, and how can I fix it? Class A (Object): @ Class Mathiff Diff Test (CLS, Data): Pass BB (A): @Classamethiff Def Test (CLS, Data): Pass Class C (B) Pass: @Classmethap Def Test (CLS, Data): Do something for data withdrawal (B, CLS). Test (data)

super Newly-style only Works with squares (which is derived from the object in the 2.x series), but A is an old style style.

To fix this, change class A (): with class A (object): .


Comments