Feb-13-2021, 03:39 AM
Hi, i trying to figure out how the except work is...
in this python code
in this python code
try:
raise Exception("a", "b")
except Exception as e:
print(e)
print(e.__str__())
print(e.args)keyword as ein here mean the "e" will catch/cover the Exception class isn't it ? so does it mean the "e" variable will become an object like this ?
e = Exception("a", "b")so how could the print(e) print(e.__str__()) print(e.args)give an output
Output:a
a
('a',)respectively....doesnt mean if we try to print(object)will give us an sort of output like this
Output:<__main__.e object at 0x0000016BF4C0F880>
