|
Generators look like normal functions, but they do not behave like them. In this video we show how to visualize them, using the Python Tutor.
Content Categories
Instructional Recordings Creation Date
December 04, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
In this video, we show how to make our own iterable and iterator classes. These are actually tightly linked, and you need one to create the other.
Content Categories
Instructional Recordings Creation Date
December 04, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Our last presentation on classes reviews the issue of typing, and why this has become much trickier with the introduction of subclasses. This is the last material covered in the second exam.The…
Content Categories
Instructional Recordings Creation Date
November 12, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Operator overloading is not the only important abstraction tool. In this video we introduce the concept of class methods, which are necessary to add new constructors to a class. These new…
Content Categories
Instructional Recordings Creation Date
November 07, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
In this video we introduce the primary tool for abstraction in Python. Operator overloading allows us to define additional meanings for any built-in symbol such as + or *. Because Python uses the…
Content Categories
Instructional Recordings Creation Date
November 07, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Subclasses inherit all of the methods of their parent. But suppose you do not want to use the inherited version of a method, but want to define a new one instead? In this video we talk about the…
Content Categories
Instructional Recordings Creation Date
November 07, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
In this presentation, we review the class definition. We look at both the syntax (what must be present for the definition to work) and the semantics (how it is processed in Python).Most of this class…
Content Categories
Instructional Recordings Creation Date
October 29, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Unlike other programming languages, a Python class has only one constructor, If we want to give the user more flexibility when creating objects, we should make certain arguments optional. In this…
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
We have seen the None value used in several previous videos. But in this video we finally introduce it formally. In particular, we show why it is so commonly used in object initialization.
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
In this video, we introduce the most important method definition in any class: the initializer. The initializer is responsible for creating all the attributes so that the user does not need to worry…
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
The primary role of an object is to store attribute variables. In this video we demonstrate the easiest way to add attributes to an object. We see that we can also add attributes to class folders as…
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Now that you know how to define a class, you need to understand how Python processes the definition. In this video, we see that Python handles it in much the same way, that it does function…
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Divide-and-conquer is not just limited to sequence types. In this video we show that it works on some objects as well. Specifically, we use it to process a family tree.
Content Categories
Instructional Recordings Creation Date
September 28, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
The biggest lie that we have told is that there is a difference between classes and the basic types. In this video we show that this is not true, and what ramifications this has for Python.
Content Categories
Instructional Recordings Creation Date
October 01, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
In the past if we wanted to do any significant computation, we needed a a fruitful function. Procedures are limited to testing or printing stuff out on the screen. But in this video we show how we…
Content Categories
Instructional Recordings Creation Date
October 01, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
|