Abstraction for students of all the things
summary
Argues that teaching concrete choices about use datetime objects instead of slicing strings, and about enumerate and duck typing for iteration, lifts scientists out of brittle one-off scripts into reusable code. Cites stdlib concepts like urllib.request and SSL sockets as explicit abstractions, recommends io for file-like objects, warns of the mutable default-argument gotcha and the abstraction vs performance tradeoff, and points to NumPy/Pandas as ready data-representation tools that usually work.
AI-written summary · about
chapters (6)
- 0:00Start
- 5:17ABSTRACTION AND MENTAL CHUNKING
- 10:47FIRST ENCOUNTERS WITH ABSTRACTION IN PYTHON
- 14:08WRITING YOUR OWN ABSTRACTIONS
- 17:19ABSTRACTION PITFALLS
- 19:03SOME PYTHON GOTCHAS ARE RELATED TO ABSTRACTION The mutable default function argument gotcha
related talks
46mOn Being Pythonic
33mElegant Solutions For Everyday Python Problems
01h 18mIntroducing More of the Standard Library
32mEasier Classes: Python Classes Without All the Cruft
01h 07mWhat Does It All Really Mean
24mPython for Humans, Designing Python Code Like a User Interface
43mPython Improvements (or This Is Not Your Teacher's Python)
39mJust Because You Can, Doesn't Mean You Should
