|
|
|
|
|
by dragonwriter
1626 days ago
|
|
> What classes are to instances, metaclasses are to classes. Given the popularity of this construct for analogies and metaphorical comparisons, it should be noted that this is strictly literal. In Python classes are objects, and the classes whose instances are classes are called “metaclasses” (and they are subclasses of the class “type”.) |
|
GP is right that metaclasses are rarely used and you’ll kind of know when you need them.
[1]: https://web.archive.org/web/20170805220114/http://www.cafepy...