Advanced OOP
6 Topics
1
Metaclasses
Classes that control class creation and behavior
Advanced Python — tests deep understanding of class creation, type() hierarchy, and when metaclasses are appropriate
2
Class Decorators
Decorators that modify or enhance classes
Advanced patterns — tests understanding of decorator mechanics and class transformation
3
Singleton Pattern
Ensuring a class has only one instance
Design patterns — tests understanding of singleton implementations, thread safety, and when singletons are appropriate
4
Factory Pattern
Object creation patterns and factory methods
Design patterns — tests understanding of creational patterns, polymorphic construction, and dependency inversion
5
Composition vs Inheritance
Choosing the right approach for code reuse
Design decisions — tests understanding of coupling, flexibility, and when to prefer composition over inheritance
6
Dependency Injection
Loose coupling through external dependency provision
Software design — tests understanding of DI principles, testability, and Python-specific DI patterns