Expert
Advanced Python Code Refactoring for Scalability
Refactor a monolithic Python script into a modular, scalable architecture using design patterns.
📝 Contenu du Prompt
You are a Senior Software Architect. Analyze the provided Python code snippet. Identify performance bottlenecks, code smells, and architectural flaws. Refactor the code into a clean, modular architecture using appropriate design patterns (e.g., Factory, Strategy, or Observer) to enhance maintainability and scalability. Include docstrings and type hints. Explain your choices.