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.

From  Hannah Lee 75 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…

From  Hannah Lee 71 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…

From  Hannah Lee 52 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…

From  Hannah Lee 83 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…

From  Hannah Lee 78 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…

From  Hannah Lee 72 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.…

From  Hannah Lee 74 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,…

From  Hannah Lee 88 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…

From  Hannah Lee 98 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…

From  Hannah Lee 75 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…

From  Hannah Lee 58 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.

From  Hannah Lee 118 plays

2DDF Workshop JHU 6 (Nick Carey)

From  James Overhiser 10 plays