The ____ method in a metaclass is called when a new object is created from a class.
- __del__
- __init__
- __new__
- __str__
The __new__ method in a metaclass is called when a new object is created from a class. This method is responsible for creating and returning a new instance of the class.
Loading...
Related Quiz
- In Python, ____ is used to define a function that takes an arbitrary number of positional arguments.
- How can you perform element-wise multiplication of two NumPy arrays?
- How can you invoke the method of a superclass from a subclass?
- How to create a single string without separators from a list of multiple strings?
- To debug Python scripts, you can use the ____ module to set breakpoints and inspect variable values.