python: super() method and new style class
if you want to use super() method to reuse a method in the parent class, you have to make sure the parent class is a “new style class”. simply speaking, any new style class can trace their inheritance to the bulit-in class “object”. For example, if you want to do
class C(B):
def meth(self, arg):
super(C, self).meth(arg)
Make sure B is defined as
class B(object):
or
class B(int):
etc...
Cat:
- cyber hacks | Time: 11:07 am (UTC+8)

