- Definitions: Class, Object, Instance, Method, Attribute.
- Basic Principles: Encapsulation, Inheritance, Polymorphism, Abstraction.
- Class Syntax: How to define a class and instantiate an object.
- Constructors (
__init__
): Purpose and usage. - Instantiation: Creating objects from classes.
- Instance Methods: How they work and when to use them.
- Class and Static Methods: Differences and uses.
- Instance and Class Attributes: Declaration and usage.
- Concept of Inheritance: How to create a subclass.
super()
and Method Overriding: How to call methods from the parent class and why override methods.- Polymorphism: How one class can be used in many ways.
- Properties and Setters: How to use properties to access and modify private attributes.
- Private and Protected Methods: Why and how to use them.
- Definition: Understand the utility of interfaces and abstract classes.
- ABC Module: How to create abstract classes using the ABC module.
- Abstract Methods: Definition and implementation.
- Custom Exceptions: Creation and usage.
- Exception Handling in OOP: How to effectively handle errors in an OOP environment.
- Singleton: Ensuring a class has only one instance and providing a global point of access to it.
- Factory: Providing an interface for creating families of related or dependent objects without specifying their concrete classes.
- Observer: Defining a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
- Strategy: Defining a family of algorithms, encapsulating each one, and making them interchangeable.
- unittest Framework: Writing and running unit tests.
- Mocking: Simulating objects and behaviors to isolate the code being tested.
- Introduction to Decorators: Understanding and basic syntax.
- Built-in Decorators:
@staticmethod
,@classmethod
,@property
. - Creating Custom Decorators: How to create and apply your own decorators.
- Iterator Concept: Understanding the iteration protocol and how to construct it.
- Generator Functions: How and why to use yield.
- Generator Expressions: Usage and benefits compared to list comprehensions.
- Meta-classes: Understanding what a meta-class is and how to create one.
- Reflection: Examining and modifying objects in real time.
- Context Managers: Creation and usage, e.g., with the with statement.
- Weak Reference: Understanding weak references and their use.
- Garbage Collection: Understanding Python's garbage collector and how to interact with it.
- Threading and Multiprocessing: Understanding the differences and using them appropriately.
- Asyncio: Writing asynchronous code using async/await.
- Profiling: Using cProfile and other tools to analyze code.
- Performance Optimization: Techniques to improve code performance, such as JIT compilation with Numba.
- Package Structure: Organizing and creating Python packages.
- Package Distribution: Using setuptools to distribute packages.
- Development of Complete Projects: Applying learned concepts in more complex projects.
- Presentations and Code Review: Sharing final projects among students and discussing solutions.