What problem does it solve?
Load when writing, reviewing, or debugging general Python code — not framework-specific. This guidance highlights the patterns Claude consistently gets wrong in production Python: mutable defaults, exception handling pitfalls, type hinting quirks, dataclass usage, closures, and other common gotchas.
Core Features & Use Cases
- Identify and explain the most error-prone Python patterns that commonly slip into production code.
- Provide concrete, ready-to-apply fixes for function definitions, class attributes, typing, and data modeling.
- Offer real-world examples to illustrate how to correct issues and improve reliability and maintainability.
Quick Start
Review the supplied Python code for common production pitfalls and refactor it to follow best practices.