Functions as Objects
At a glance
- Price Free to watch, no sign-up
- Runtime 1 h 18 min
- Topics Computer Science
- Source MIT, Introduction to CS and Programming using Python
- Lecture Lecture 8 of 25
- Language English
MIT lecturer Ana Bell continues the 6.100L Introduction to Computer Science and Programming using Python course with a session on functions as first-class objects. She explains how functions in Python have a type and can be assigned to variables, passed as arguments to other functions, or returned as results from other functions. The lecture also works through scopes and environments, showing how variable lookup rules affect what a function can see and modify, and how understanding these rules helps programmers write concise, readable code. Bell builds up examples on the board or screen step by step, connecting the abstract rules to concrete code snippets. Part of the Fall 2022 offering of MIT's 6.100L course, available through MIT OpenCourseWare.