Clean Code in Python: Myths, Facts and Double Standards
summary
Analysis of over 5,000 popular open-source Python projects to test claims about "clean code" and adherence to best practices like PEP8. The talk presents the methodology for that analysis and highlights concrete findings about which coding conventions are actually followed, which are myths, and where double standards appear.
AI-written summary · about
chapters (23)
- 0:00Introduction
- 1:08Clean Code myths
- 4:41Analyzing open-source Python
- 11:32Super() inheritance pitfalls
- 14:53Star imports encapsulation
- 16:20LRU cache production
- 18:06Vanilla WSGI server
- 19:12Chained comparisons
- 21:21Dataclasses slots issues
- 23:10Pattern matching adoption
- 25:38Async decorators
- 26:21Walrus operator practice
- 27:49For-else loops
- 28:54Sentinel arguments
- 30:21Anti-patterns in top projects
- 32:07File handling without context
- 33:52Mutable defaults
- 36:00Global variables
- 37:44Contributing to open source
- 39:48Security risks in eval
- 42:18Tabs vs spaces
- 44:25Code quality tools
- 45:31Q&A
