Metaclass
Definition, Meaning & Examples
Part of speech noun
Quick meaning: Metaclass is a noun meaning (object-oriented programming) A class that serves as a template for other classes rather than objects.
Meaning
(object-oriented programming) A class that serves as a template for other classes rather than objects.
Example Sentences
First, the class can explicitly specify its metaclass by either setting a __metaclass__ class variable (Python 2), or supplying the metaclass keyword argument in the tuple of base classes (Python 3).
That is, all metaclasses (such as Collection class, Object class and Set class) are instances of the class Metaclass. This is because all metaclasses have the same behavior. They define the structure, definition and behavior of a class.
Word Forms
- metaclasses
Related Words
Related dictionary entries include metaclassifier, template, superclass, classifier, mixin, subclass.
Related Dictionary Tools
Sources & Attribution
FreeDictionaryAPI.com / Wiktionary · Original source · CC BY-SA 4.0
Dictionary data is provided by FreeDictionaryAPI.com and sourced from Wiktionary under its stated license.