Exception handling in python(1)

Migo
1 min readMay 6, 2021

In this post, I’ll be talking about types of Error and how we handle them in Python.

But, Before we go further, why do we need exception handling in the first place? The following is a real-life example.

Suppose there was an automobile company, ‘A’ and they had a department leader meeting.

  1. The agenda was set and they brought it to their department.
The above example is along the same line on how you draw ABC in python.

2. And in each department further discussion was held to get a more detailed plan.

This is considered as the second process of making ABC

3. Finally they execute the plan.

This is equivalent of making class and objects. 

But, an anomalous happened; a competitor released their new car. (Exception occurred)

So, you do the followings.

  1. You promote a cheaper option to customers
    - exception handling

2. If your company failed to cope with the exception, it would go bankrupt.

In python, to enable you to handle exceptions PVM provides classes that are designed to target each possible errors.

--

--

Migo

Establishment Challenger. Love to put groundless assumption, not always though.