← Fullstack with Vue.jsQuestion 8 of 62
What is a metaclass in Python?
📘 Explanation
A metaclass is the class of a class, so it governs how classes themselves are built, typically by customizing type and hooking into new or init. The other choices misdescribe it as a module, an abstract base class, or a decorator, none of which matches how metaclasses actually work.
Related questions
- What’s the difference between __new__ and __init__?
- What’s the difference between is and == in Python?
- What’s the difference between shallow and deep copy in Python?
- How do you write a decorator with arguments (like @timinglogger(threshold=0.1))?
- What’s the issue with default mutable arguments in Python?
← PreviousNo login needed