Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is a metaclass?
Think of 'class of a class'.
How do you create a class dynamically in Python?
Remember the format: `type(name, bases, dict)`.
What is a metaclass?
Focus on the definition of 'class of a class'.
True or False: The type() function cannot be used for dynamic class creation.
Remember the function's main purpose!
Create a custom metaclass that enforces all class names to be in uppercase.
Consider string methods to manipulate the name.
Using metaprogramming, create a class that automatically adds a method for calculating the factorial of a number.
Think of a lambda function that calculates factorial.
5 more questions in this section. Enroll free to practise them all.
Enroll free