(ax and defined in class itself metaclass method callgets cls (instance method callsget inst (by (bz (instance doesn' see meta names attributeerror'bobject has no attribute 'xmetaclass methods versus class methods though they differ in inheritance visibilitymuch like class methodsmetaclass methods are designed to manage class-level data in facttheir roles can overlap--much as metaclasses do in general with class decorators--but metaclass methods are not accessible except through the classand do not require an explicit classmethod class-level data declaration in order to be bound with the class in other wordsmetaclass methods can be thought of as implicit class methodswith limited visibilityclass (type)def (cls)cls cls cls metaclass methodgets class class (metaclass= )yz @classmethod def (cls)return cls class methodgets class ( call metaclass methodvisible to class only creates class data on baccessible to normal instances ( xi yi ( (class methodsends classnot instancevisible to instance (metaclass methodsaccessible through class only attributeerror'bobject has no attribute 'ametaclass methods