bpo-27165: Skip callables when printing an exception details by BookLaugh · Pull Request #9699 · python/cpython (original) (raw)

The html variant skips names starting with an underscore. Shouldn't they be skipped in the raw text variant?

Test also methods not starting with an underscore (currently there is only one such method: with_traceback) and instance attributes starting with an underscore like __dict__.

Add tests for exceptions that have attributes like UnicodeEncodeError or ImportError.