Ответ 1
Лучшим объяснением может быть исходный код:
class classonlymethod(classmethod):
def __get__(self, instance, owner):
if instance is not None:
raise AttributeError("This method is available only on the view class.")
return super(classonlymethod, self).__get__(instance, owner)
Различие заключается в том, что a classmethod
можно вызвать в экземпляре, имея тот же эффект, что и вызов его в классе, но classonlymethod
может быть вызван только классом.