use-namedtuple-record
Installation
SKILL.md
use-namedtuple-record
When to Use
- Need tuple-like efficiency with named access
- Data should be immutable
- Will use as dict keys or in sets
- Want self-documenting code
- Replacing anonymous tuples with meaning
- Coordinates, points, records
When NOT to Use
- Need mutable fields (use dataclass)
- Need methods beyond basic access
- Complex initialization logic needed
The Pattern
Use namedtuple for lightweight, immutable records with named fields.