Lecture 12: List Comprehension, Functions as Objects, Testing, and Debugging
At a glance
- Price Free to watch, no sign-up
- Runtime 1 h 16 min
- Topics Computer Science
- Source MIT, Introduction to CS and Programming using Python
- Lecture Lecture 12 of 25
- Language English
Ana Bell continues MIT's 6.100L, Introduction to Computer Science and Programming using Python, with a session on list comprehension and functions treated as objects that can be passed around and stored like any other value. She covers keyword arguments and default arguments for writing more flexible function signatures, then moves into testing and debugging strategy, contrasting black box testing, which checks behavior against a specification without looking at the code, against glass box testing, which uses knowledge of the implementation to target specific paths through it. Worked examples on the board show how to design test cases that catch edge cases and how to narrow down the source of a bug systematically. Part of the Fall 2022 offering of MIT OpenCourseWare's introductory Python course, recorded in a standard lecture hall format with slides and live coding.