Learn Python

OOP

15 questions

Easy
Easy
Easy
Medium
super().__init__ in subclass
Medium
Mutable class attribute shared state
Medium
What @dataclass generates
Medium
Operator overloading with __add__
Medium
__repr__ vs __str__
Medium
classmethod vs staticmethod
Medium
What super() does
Hard
Shadowing a class attribute via assignment
Hard
Method resolution with super() chain
Hard
__eq__ and its effect on __hash__
Hard
What __enter__ and __exit__ do

Sign in to save your progress.