Last updated on 1/26/21
Use Inheritance Behavior in a Python Program
- Use inheritance behavior in a Python program
When a class inherits from another class, it gains the parent class’s:Careful, there are several correct answers.
An abstract base class:
Can be instantiated, but should be inherited from.
Can’t be instantiated or inherited from.
Can’t be instantiated, but can be inherited from.
Duck typing is:
When Python cares about what an object can do, not what type it is.
When you have to define each variable’s type.
When you can use a child object rather than its parent.