PEP 8: How to Avoid Being a Python Hooligan
summary
Compares a messy “hooligan” function with a clean one that both compute Euclidean distance (result 4.24) to show that naming, docstrings and unpacking make code readable; claims PEP 8 saves maintenance time and therefore money for stakeholders; recommends linters/formatters: Black and isort auto-refactor code, use flake8 (+plugins) for style, run mypy requires annotations and is slow to add, and run checks in pre-commit hooks or CI; shows bandit flags use of os.system.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:12Who is Python Hooligan
- 8:03PEP Conventions
- 13:22Programming Recommendations
- 16:40Tools
- 20:40Conclusions
related talks
23mReadability Counts
21mMaking the Most Out of Code Reviews
30mPython Tricks You Can't Live Without
24mPython for Humans, Designing Python Code Like a User Interface
51mTaking Python beyond scripting
25mBecoming a Better Curator of Your Code
30mPython for Humans - Designing Python Code Like a User Interface
28mPreventing headaches with linters and automated checks
