ソースコードは以下です。
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)
classonlymethod は、Python の classmethod とは異なり、インスタンスではなくクラスでしか呼び出せないことがわかりますが、なぜそのような「制限」が必要なのですか?
classonlymethod に関する www にはあまりありません。素人の例はいつものように高く評価されています。