Steven D'Aprano wrote:
On Tue, Jun 05, 2012 at 10:20:58AM +0300, Eli Bendersky wrote:
Still, instance of type()" is a bit too cryptic for mere mortals, IMHO.
I think that if somebody finds "instance of type" too cryptic, they won't have any chance at all to understand metaclasses.
Personally, I think there is a lot confusing about metaclasses, but the idea that classes are instances (objects) is not one of them.
One thing that *is* confusing is that the metaclass parameter in class
creation is not the metaclass (class of the class), but the class
factory. For example:
def silly(*args):
print(*args)
return int
class C(metaclass=silly):
def m(self): pass
C () {'m':