Search for tag: "underscore"

Lesson 28.2 Iterable Classes

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.

+19 More
From  Hannah Lee 78 plays

Lesson 23.5 Mixed-Type Operators

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…

+19 More
From  Hannah Lee 76 plays

Lesson23.4 The is Operator

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…

+19 More
From  Hannah Lee 56 plays

Lesson 23.3 Object Equality

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…

+19 More
From  Hannah Lee 88 plays

Lesson 23.2 Operator Overloading

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…

+19 More
From  Hannah Lee 84 plays

Lesson 22.6 Method Overriding

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…

+19 More
From  Hannah Lee 80 plays

Lesson 22.3 The object Class

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.…

+19 More
From  Hannah Lee 79 plays

Lesson 21.6 Immutable Attributes

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,…

+19 More
From  Hannah Lee 93 plays

Lesson 21.5 Data Encapsulation

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…

+19 More
From  Hannah Lee 104 plays

Lesson 20.10 Representation Methods

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…

+19 More
From  Hannah Lee 79 plays

Lesson 9.10 Conditional Scripts

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…

+19 More
From  Hannah Lee 63 plays

Lesson 2.2 Assignment Statements

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.

+19 More
From  Hannah Lee 134 plays

2DDF Workshop JHU 6 (Nick Carey)

From  James Overhiser 10 plays