def __init__(self, coeff=0., var=None): if self.__class__ is SourceTerm: raise AbstractBaseClassError CellTerm.__init__(self, coeff=coeff, var=var)
def __init__(self, coeff = 0.): if self.__class__ is SourceTerm: raise NotImplementedError, "can't instantiate abstract base class" CellTerm.__init__(self, coeff = coeff)