python-3-13-patterns
Installation
SKILL.md
Python 3.13 Modern Patterns
Core Principles
Python 3.13 represents the culmination of modern Python design. This skill covers essential patterns for writing clean, efficient, and maintainable Python code using the latest language features.
Modern Type Annotations (Built-in Generics)
Python 3.9+ allows using built-in types for generic annotations. This is the required pattern for all new code:
# ✅ REQUIRED: Use built-in types
def process_items(items: list[str]) -> dict[str, int]:
return {item: len(item) for item in items}
def merge_data(data1: dict[str, any], data2: dict[str, any]) -> dict[str, any]:
return {**data1, **data2}