Practice ยท 1 of 3
Mixin that must come first
You are given a base Base with label() returning 'base'. Build a class Widget from mixins and Base such that Widget().label() returns 'widget+base':
- LabelMixin overrides label() to return 'widget+' + super().label()
- the class statement must be class Widget(<one or more mixins>, Base) โ the mixin must run BEFORE Base's method
- also return the MRO class names (excluding object) from mro_names() as a list
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: MRO & Mixin Practice