Should we use 'raise from'? #952
MartinThoma
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently looking at several issues Flake8 points out. One group is this:
Basically when we capture an exception and raise a new one, we could use
raise from
(introduced with PEP 3134 in Python 3.0).I like using
raise from
in my applications as it gives me a better idea where an issue came from.However, for users of PyPDF2 I'm not so sure if that will help in any way. When I use PyPDF2 I'm typically only interested in the PDF that caused the issue, not the exact path how it caused an issue.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions