Lecture 17: Python Classes
At a glance
- Price Free to watch, no sign-up
- Runtime 48 min
- Topics Computer Science
- Source MIT, Introduction to CS and Programming using Python
- Lecture Lecture 17 of 25
- Language English
Ana Bell teaches this session of MIT's 6.100L, Introduction to CS and Programming using Python, on object-oriented programming in Python. She explains how classes let programmers package data and behavior together so code can be reused without name collisions between separate objects, walking through how instances maintain their own independent environments. The lecture builds up to inheritance, showing how a subclass can take a superclass's methods and attributes wholesale, override specific ones, or extend them with new behavior, using worked code examples on the board to show class definitions, instantiation, and method calls in practice. Runtime is 48 minutes, consistent with a full classroom session rather than a trimmed clip, and the material assumes familiarity with earlier material in the course on functions and data structures.