Search for tag: "assertion"
Lesson 25.4 The raise StatementUp until now, the only way that we knew how to create an error is with an assert statement. But these always create errors with the type AssertionError. In this video we show how to create errors…
From Hannah Lee
70 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
69 plays
|
|
Lesson 25.2 Error-Specific RecoveryIn this video we show how to use the error type to give you more control over a try-except statement. You can chose to recover from some errors, while completely ignoring other errors.
From Hannah Lee
73 plays
|
|
Lesson 25.1 Error TypesIn this video we revisit error messages in Python and show how to read the error type. This type is a class, which means that you can construct your own error objects.
From Hannah Lee
75 plays
|
|
Lesson 24.1 Strict TypingWhenever we have enforced preconditions, we have always used the type function. In this video we show why that is a problem, particularly when we want to use an object argument that is a subclass of…
From Hannah Lee
65 plays
|
|