Search for tag: "getter"

Lesson 24.4 Duck Typing

This partial typing from the previous video has a name. It is called duck typing. In this video we show both why this is so popular among Python programmers and also why it is so controversial.

From  Hannah Lee 75 plays

Lesson 23.8 Properties (OPTIONAL)

This video introduces an advanced topic that is completely optional and will not appear on any exam. Classes like RGB and Point3 appear to enforce their invariants without any getters and setters.…

From  Hannah Lee 31 plays

Lesson 22.8 Subclass Initializers

In this video we show that thte primary purpose of the super function is in the initializer method of the subclass. That is because we cannot guarantee that all of the attributes for the parent class…

From  Hannah Lee 68 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 89 plays

Lesson 21.4 Invariant Enforcement

We know how to enforce preconditions, but how do we force invariants for our attributes? As we see in this video, we do it much the same as for preconditions. But that is because we are going to…

From  Hannah Lee 104 plays