Passer au contenu principal
Bluvy Tube
Appuyez sur Échap pour quitter le plein écran
Volume m
/
i
Mode Cinéma t
f
/
Week 4 of my #Python Foundations course is live. 🎉 This week there are no new features and that's on purpose. 🚀 By Week 3 the journal app is a 117-line main.py that holds the model, the storage and the CLI. It works, but that one file is starting to hurt. 💡 This week you'll refactor it:

Raccourcis clavier

Espace K
Lecture / pause
← →
Reculer / avancer de 5 s
J L
Reculer / avancer de 10 s
0–9
Aller à 0 %–90 % de la vidéo
Home End
Début / fin
, .
Image précédente / suivante (en pause)
< >
Ralentir / accélérer
↑ ↓
Volume
M
Couper / rétablir le son
C
Sous-titres
F
Plein écran
I
Image dans l’image
T
Mode cinéma
?
Afficher cette aide

Week 4 of my #Python Foundations course is live. 🎉 This week there are no new features and that's on purpose. 🚀 By Week 3 the journal app is a 117-line main.py that holds the model, the storage and the CLI. It works, but that one file is starting to hurt. 💡 This week you'll refactor it:

Bob Belderbos

Bob Belderbos

@bbelderbos.bsky.social

S'abonner
0 vue Publié le 12/10/2026 15:00 0:21
#python
Week 4 of my #Python Foundations course is live. 🎉 This week there are no new features and that's on purpose. 🚀 By Week 3 the journal app is a 117-line main.py that holds the model, the storage and the CLI. It works, but that one file is starting to hurt. 💡 This week you'll refactor it:
1 commentaire
?
→ Split it into a journal package with a src/ layout (models.py, db.py, cli.py)

→ Group the storage functions into a `JournalDatabase` class, because every function was being passed the same db_path

→ Move shared test setup into pytest fixtures in conftest.py
→ Add an entry point to pyproject.toml so uv run journal works like an installed tool

The behavior doesn't change and the test suite will help you refactoring it: 22 tests pass before + after.
Voir le post d'origine sur Bluesky
Lien copié dans le presse-papier

Connexion

Il est temps de faire une pause

Ça fait 30 minutes que vous enchaînez les vidéos : accordez-vous 5 minutes loin de l'écran. Levez-vous, étirez-vous, buvez un verre d'eau… Les vidéos vous attendront ici.