Search for tag: "arguments"
Lesson 28.6 map and filterIn this video we talk about two very famous generators: map and filter. We show how to use these to replace writing code with a for-loop.
From Hannah Lee
52 plays
|
|
Lesson 25.3 Error Types and the Call StackAfter the last video, try-except looks less like an if-else statement and more like an if-elif-else statement. As we see in this video, this has profound effects on how errors interact with the call…
From Hannah Lee
72 plays
|
|
Lesson 22.7 The super FunctionSometimes you do not want to completely override a method. You just want to override part of it, or add a few extra features at the end. In this video, we introduce the super function which allows us…
From Hannah Lee
83 plays
|
|
Lesson 20.9 Optional ArgumentsUnlike 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…
From Hannah Lee
94 plays
|
|
Lesson 20.7 IntializersIn 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…
From Hannah Lee
126 plays
|
|
Lesson 20.5 Method DefinitionsIn addition to attributes, objects also have methods. In this video, we show how to add a method definition to a class. For the most part, it is as simple as indenting a function definition inside of…
From Hannah Lee
121 plays
|
|
Lesson 20.2 Class VisualizationNow 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…
From Hannah Lee
132 plays
|
|
Lesson 19.8 Keyword Expansion (OPTIONAL)This video introduces an advanced topic that is completely optional and will not appear on any exam. Keyword expansion is the dictionary version of tuple expansion. It is used in modules like Kivy to…
From Hannah Lee
104 plays
|
|
Lesson 16.8 Tuple Expansion (OPTIONAL)This video introduces an advanced topic that is completely optional and will not appear on any exam. You might have noticed that some functions, like max can take an arbitrary number of arguments. In…
From Hannah Lee
54 plays
|
|
Lesson 16.4 Range-Based For-LoopsStrings, lists, and tuples are not the only iterable types. In this video we introduce the range function, which creates another iterable value. This is going to allow us to do several things that we…
From Hannah Lee
106 plays
|
|
Lesson 13.2 Error ResponsibilityWhen we introduced specifications, we talked about responsibility; if there is a problem with a function, it is either the fault of the definer or the caller. In this video, we show how we read an…
From Hannah Lee
65 plays
|
|
Lesson 12.5 Functions as VariablesIf function definitions are objects, then that means we can compute with them like any other object. In this video we show what happens when we assign a function definition to a variable, or why we…
From Hannah Lee
79 plays
|
|
Lesson 12.4 Functions in MemoryWe know what happens when we call a function. But as we show in this video, Python also does something very important when we define a function. It has to store the definition somewhere.
From Hannah Lee
85 plays
|