Explore principles for maintaining clean code with modules and packages in Python. Learn about module collaboration, interfacing, abstract base classes, managing dependencies, practicing polymorphism, and handling exceptions across modules.
Overview
Syllabus
- Unit 1: Clean Code with Multiple Classes: Introduction and Code Smells
- Refactoring Feature Envy in Employee and Department Classes
- Refactoring Message Chains in Python
- Middle Man Code Smell Refactoring Task
- Refactor Inappropriate Intimacy to Improve Class Encapsulation
- Unit 2: Abstract Base Classes and Flexible Design
- Implementing Abstract Classes for Payment Flexibility
- Streamlining Payment Processing
- Refactor Code Using Abstract Classes in Python
- Unit 3: Dependency Management between Classes
- Decoupling Class Dependencies in Python
- Refactoring for Dependency Injection in Python
- Implementing the Factory Pattern in Python
- Unit 4: Polymorphism in Practice
- Implementing Polymorphism in Python with Abstract Base Classes
- Implementing Polymorphism with Behaviors in Python
- Unit 5: Introduction to Exception Handling in Python
- Enhancing Exception Handling in a Banking Application
- Refactor Exception Handling in Library System