def require_abstract_fields(obj, cls):
    abstract_fields = getattr(cls, 'abstract_fields', None)
if abstract_fields is None:
    return
for field in abstract_fields:
    if not hasattr(obj, field):
        raise RuntimeError('object %s failed to define %s' % (obj, field))


class a(object):
    abstract_fields = 'x',

def __init__(self):
    require_abstract_fields(self, a)


class b(a):
    abstract_fields = 'y',
x = 5

def __init__(self):
    require_abstract_fields(self, b)
super(b, self).__init__()
b()
a()
Эквивалент NotImplementedError для полей в Python