Tags
Language
Tags
April 2024
Su Mo Tu We Th Fr Sa
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 1 2 3 4

Real Python - Raising and Handling Python Exceptions

Posted By: lucky_aut
Real Python - Raising and Handling Python Exceptions

Real Python - Raising and Handling Python Exceptions
Duration: 33m | MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz, 2 Ch | 139 MB
Genre: eLearning | Language: English

A Python program terminates as soon as it encounters an error. In Python, an error can be a syntax error or an exception.

In this course, you’ll learn what an exception is and how it differs from a syntax error. After that, you’ll learn about raising exceptions and making assertions. Then, you’ll learn how to catch exceptions to prevent your program from unintentionally ending and to change the control flow of your program
You’ll learn about the basic use of a try … except block, as well as how to extend it using else and finally.

In this course, you’ll learn how to

Differentiate exceptions from syntax errors
Use the assert keyword to check if a certain condition is met
Write custom exceptions that subclass Exception
Catch exceptions with a try … except block
Use the additional keywords else and finally
Catch built-in exceptions