Search for tag: "assertion"

Lesson 25.4 The raise Statement

Up 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 66 plays

Lesson 25.3 Error Types and the Call Stack

After 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 65 plays

Lesson 25.2 Error-Specific Recovery

In 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 67 plays

Lesson 25.1 Error Types

In 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 71 plays

Lesson 24.1 Strict Typing

Whenever 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 60 plays

CS2110-FA17-05 Session 05

2017-09-05 00:00:00+00

From  mjp337@cornell.edu 240 plays