Introduction to Containership and Inheritance
Explore how Python enables code reuse using containership and inheritance. Understand the difference between 'has a' and 'like a' relationships and learn when to apply each for designing classes effectively.
We'll cover the following...
We'll cover the following...
Reuse mechanisms
Instead of reinventing code that is already available, it makes sense to reuse existing code.
Python allows two mechanisms for reusing code:
- Containership