metaclass
English
Etymology
Noun
metaclass (plural metaclasses)
- (object-oriented programming) A class that serves as a template for other classes rather than objects.
- 1997, John Hunt, Smalltalk and Object Orientation: An Introduction, Springer Science & Business Media, →ISBN, page 345:
- That is, all metaclasses (such as
Collection class,Object classandSet class) are instances of the classMetaclass. This is because all metaclasses have the same behavior. They define the structure, definition and behavior of a class.
- 2009, David Beazley, Python Essential Reference, Addison-Wesley Professional, →ISBN, page 139:
- First, the class can explicitly specify its metaclass by either setting a
__metaclass__class variable (Python 2), or supplying themetaclasskeyword argument in the tuple of base classes (Python 3).
Translations
object-oriented programming
|