Lecture 18: More Python Class Methods
At a glance
- Price Free to watch, no sign-up
- Runtime 1 h 17 min
- Topics Computer Science
- Source MIT, Introduction to CS and Programming using Python
- Lecture Lecture 18 of 25
- Language English
Ana Bell continues MIT's 6.100L Introduction to Computer Science and Programming using Python with a session on object-oriented programming fundamentals. The lecture covers decomposition and abstraction as they apply to Python classes, showing how bundling data and behaviors into objects lets programmers use them consistently across a program. Bell walks through dunder methods, the double-underscore methods like __init__ and __str__ that Python uses behind the scenes for common operations such as printing or comparing objects, demonstrating that these special methods are ordinary methods once you look past the syntax. Part of the Fall 2022 offering of MIT's introductory programming course, the lecture runs just under eighty minutes and assumes familiarity with earlier material on class basics. It is aimed at students building toward a fuller grasp of how Python's object model works under the hood.