Skip to content

docs(conferences): add tuples to lecture 4 - #337

Merged
apiad merged 1 commit into
mainfrom
conf4-tuplas
Oct 7, 2026
Merged

apiad merged 1 commit into
mainfrom
conf4-tuplas

Conversation

@apiad

@apiad apiad commented Oct 7, 2026

Copy link
Copy Markdown
Member

Hotfix: lecture 4 is today (2026-10-07), so this skips the issue.

The 2026 plan had no place for tuples. Lecture 4 already used for i, nota in enumerate(notas) without explaining it, lecture 5 uses enumerate again, and lecture 6 (dictionaries) will need .items().

Changes:

  • New section 6, "Tuplas", between the grade project and lists of lists: an immutable sequence, why it exists (a few values where each position means something), unpacking, the ValueError on a count mismatch, enumerate explained, the comma builds the tuple and (5,), return a, b, and a, b = b, a.
  • A forward reference from the enumerate paragraph in section 2.
  • Sections 7 to 9 renumbered, and the one "sección 6" reference in the exercises updated.
  • Two summary bullets, and a new exercise 2 (minimo_y_maximo in one pass, without min/max). The old exercises 2 to 8 are now 3 to 9; the swap paragraph points at exercise 3 (invertir_en_el_lugar).
  • plan.md mentions tuples in the lecture 4 entry.

The tuples section sits after the project on purpose: it uses min and max, which the project section introduces only after writing maximo by hand.

Verified: scriptorium render notas.md exits 0, the PDF went from 15 to 18 pages, and every new block's output in the PDF (the TypeError, the ValueError, [(0, 4), (1, 5), (2, 3)], 2 1) is what Python 3.14 printed. The sieve growth figure still renders.

🤖 Generated with Claude Code

The 2026 plan had no place for tuples, while lecture 4 already used
`for i, nota in enumerate(...)` and lectures 5 and 6 lean on unpacking.
New section 6 covers the tuple as an immutable sequence, unpacking,
multiple return values and `a, b = b, a`, plus a summary bullet pair and
a `minimo_y_maximo` exercise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apiad apiad closed this Oct 7, 2026
@apiad
apiad deleted the conf4-tuplas branch October 7, 2026 09:55
@apiad
apiad restored the conf4-tuplas branch October 7, 2026 09:55
@apiad apiad reopened this Oct 7, 2026
@apiad
apiad merged commit 3e29107 into main Oct 7, 2026
0 of 2 checks passed
@apiad
apiad deleted the conf4-tuplas branch October 7, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant