Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
You are not looking at the class, you are looking at an instance: py> exc = ZeroDivisionError('divide by zero') py> type(exc).__name__ 'ZeroDivisionError' py> exc.__name__ Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'ZeroDivisionError' object has no attribute '__name__' ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35836> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com