There is no Python keyword for this - it is not Pythonic.
Whether a class can be subclassed is determined by a flag called Py_TPFLAGS_BASETYPE which can be set via the C API.
This bit is set when the type can be used as the base type of another type. If this bit is clear, the type cannot be subtyped (similar to a “final” class in Java).
You can however emulate the behaviour using only Python code if you wish:
class Final(type):
def __new__(cls, name, bases, classdict):
for b in bases:
if isinstance(b, Final):
raise TypeError("type '{0}' is not an acceptable base type".format(b.__name__))
return type.__new__(cls, name, bases, dict(classdict))
class C(metaclass=Final): pass
class D(C): pass
Source