python inheritance Flashcards
1
Q
what does super() do?
A
allows the child to access parent methods and properties
2
Q
how can a child override parent method implementation?
A
just define the same method
3
Q
what is the @staticmethod decorator?
A
This is a defined decorator that will not modify the state of a class or method
4
Q
when is it helpful to use @staticmethod ?
A
when it makes sense to group a method with a class, but the method doesn’t modify the state of the class or instance