- You use a
mixinto force a function to accept an argument at runtime even if the argument wasn’t included in the function’s definition. - You use a
mixinto allow a decorator to accept keyword arguments. - You use a
mixinto make sure that a class’s attributes and methods don’t interfere with global variables and functions. - If you have many classes that all need to have the same functionality, you’d use a
mixinto define that functionality.
Correct Answer:
- If you have many classes that all need to have the same functionality, you’d use a
mixinto define that functionality.