What problem does it solve?
This Skill helps developers write more robust and error-free Python code by highlighting common pitfalls related to mutable defaults, import mechanisms, scope, string handling, iteration, classes, exceptions, numerics, file I/O, and concurrency.
Core Features & Use Cases
- Avoids Mutable Defaults: Prevents unexpected shared state across function calls.
- Clarifies Import Logic: Guides on best practices for module imports and avoids common traps.
- Explains Scope Rules: Details how variables are accessed and modified in different contexts.
- Use Case: A developer is encountering strange behavior in their Python application where a list passed as a default argument seems to be modified unexpectedly across different function calls. This Skill provides the exact explanation and solution.
Quick Start
Use the Python skill to understand why default mutable arguments can cause issues.