[Numpy-discussion] MAINT: Use of except-pass blocks

Michael Dubravski mdubravski at gmail.com
Tue Apr 6 14:26:57 EDT 2021

Hello everyone,


There are multiple instances of except-pass blocks within the codebase that to my knowledge are bad practices (Referencing This StackOverflow Article. For example in numpy/ma/core.py there is an except-pass block that catches all exceptions thrown. Another example of this can be found in numpy/core/function_base.py. I was wondering if it would be a good idea to add some print statements for logging the exceptions caught. Also for cases where except-pass blocks are needed, is there an explanation for not logging exceptions?







Michael Dubravski

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/numpy-discussion/attachments/20210406/e1727642/attachment.html>

More information about the NumPy-Discussion mailing list