class Base(object):

    def __init__(self):
        if not hasattr(self, 'logfile'):
            raise Exception('not implemented')


class d1(Base):
    logfile = 'logfile1.log'


class d2(Base):
    pass
d1()
d2()
different values for class variables in each subclass in python