Back to Skills

python-fundamentals-313

verified

Complete Python 3.13+ fundamentals system. PROACTIVELY activate for: (1) Python 3.13 free-threading (no-GIL), (2) JIT compiler usage, (3) Pattern matching syntax, (4) Walrus operator, (5) F-string features 3.12+, (6) Type parameter syntax 3.12+, (7) Exception groups, (8) Dataclasses and enums, (9) Context managers. Provides: Modern syntax, performance features, best practices, naming conventions. Ensures correct Python 3.13+ patterns with optimal performance.

View on GitHub

Marketplace

claude-plugin-marketplace

JosiahSiegel/claude-plugin-marketplace

Plugin

python-master

Repository

JosiahSiegel/claude-plugin-marketplace
7stars

plugins/python-master/skills/python-fundamentals-313/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/JosiahSiegel/claude-plugin-marketplace/blob/main/plugins/python-master/skills/python-fundamentals-313/SKILL.md -a claude-code --skill python-fundamentals-313

Installation paths:

Claude
.claude/skills/python-fundamentals-313/
Powered by add-skill CLI

Instructions

## Quick Reference

| Feature | Version | Syntax |
|---------|---------|--------|
| Free-threading | 3.13t | `python3.13t script.py` |
| JIT compiler | 3.13 | `PYTHON_JIT=1 python3.13 script.py` |
| Pattern matching | 3.10+ | `match x: case {...}:` |
| Walrus operator | 3.8+ | `if (n := len(x)) > 10:` |
| Type params | 3.12+ | `def first[T](items: list[T]) -> T:` |
| Type alias | 3.12+ | `type Point = tuple[float, float]` |

| Construct | Code | Use Case |
|-----------|------|----------|
| Exception Group | `ExceptionGroup("msg", [e1, e2])` | Multiple errors |
| except* | `except* ValueError as eg:` | Handle groups |
| @dataclass(slots=True) | Memory efficient | High-volume objects |
| StrEnum | `class Status(StrEnum):` | String enums 3.11+ |

## When to Use This Skill

Use for **Python 3.13+ fundamentals**:
- Learning Python 3.13 new features (free-threading, JIT)
- Using modern pattern matching syntax
- Writing type-annotated generic functions
- Creating dataclasses and enums
- Understanding Python naming conventions

**Related skills:**
- For type hints: see `python-type-hints`
- For async: see `python-asyncio`
- For common mistakes: see `python-gotchas`

---

# Python 3.13+ Fundamentals

## Overview

Python 3.13 (released October 2024) introduces significant performance improvements including experimental free-threading (no-GIL) mode, a JIT compiler, enhanced error messages, and improved REPL.

## Python 3.13 New Features

### Free-Threaded Mode (Experimental)

```python
# Python 3.13t - Free-threaded build (GIL disabled)
# Use python3.13t or python3.13t.exe

import threading
import time

def cpu_bound_task(n):
    """CPU-intensive calculation that benefits from true parallelism"""
    total = 0
    for i in range(n):
        total += i * i
    return total

# With free-threading, these actually run in parallel
threads = []
for _ in range(4):
    t = threading.Thread(target=cpu_bound_task, args=(10_000_000,))
    threads.append(t)
    t.start()

for t in threads

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10801 chars