|
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
|
|
Operator overloading allows us to redefine the meaning of + or * on objects of our class. But sometimes we want to mix together types like a fraction and integer. In this video we show that it is…
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
|
|
As we saw in the previous video, we cannot trust == if we need to test if two variables refer to the same object folder. In this video we show an alternative operator is, which is safe to use because…
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
|
|
Previously when we compared objects, we compared them attribute-by-attribute. That is because the meaning of == on objects is less clear. As we show in this video, that is because equality (and 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 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
|
|
Every class must be a subclass of something, and that parent class goes inside of the parentheses. That means that the word object we have been using in all of class definitions is actually a class.…
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
|
|
Getters and setters have another advantage in that they allow us to completely disable to any changes to an attribute. This allows us to separate attributes into mutable and immutable attributes,…
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
|
|
In this previous video we introduced the concept of getters and setters. But how do we force the user to use these when the attribute is so much simpler. In this video we talk about the concept of…
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
|
|
When we first introduced objects, we talked about the concept of object representation. But how does Python know how to use this representation. In this video, we see that this is the result of…
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 only difference between a module and a script is how you run it. But we have seen Python files that do different things when you run them as a script or import them as a module. This is done with…
Content Categories
Instructional Recordings Creation Date
September 23, 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 we have some idea of what a variable is, it is time to start creating them. We do that with assignment statements, which are the subject of this video.
Content Categories
Instructional Recordings Creation Date
September 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
|
|
|