https://pantsbuild.org/ logo
#random
Title
# random
h

hundreds-father-404

05/13/2019, 2:24 PM
Interesting insight from PyCon talk on exceptions. We should never use this idiom
str(e)
, and only ever
repr(e)
.
repr(e)
will include the exception name
Copy code
In [1]: str(ValueError("Hi"))
Out[1]: 'Hi'

In [2]: repr(ValueError("Hi"))
Out[2]: "ValueError('Hi')"