This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients Nathaniel Manista, ammar2, brett.cannon, docs@python, fdrake, methane, rhettinger
Date 2018-08-31.08:48:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

For example, I found flask_mako's TemplateException in this search result.

Strictly speaking, this is not base exception class.  It is wraps exception during template rendering.  But "why this class is useful?" is very similar to base exception class.

It provides better traceback for mako template.  They use this class for "particular reason", not because it's generally recommended practice.

And this "particular reason" shouldn't be in Python tutorial, clearly.


If we really need exception class hierarchy in tutorial, I think OSError is the best example.  When opening a file, `except OSError:` is much better than `except (PermissionError, FileNotFound, ...)`.  It's the most clear example when common base class for some distinct exceptions is useful.
Date User Action Args
2018-08-31 08:48:49methanesetrecipients: + methane, fdrake, brett.cannon, rhettinger, docs@python, Nathaniel Manista, ammar2
2018-08-31 08:48:49methanesetmessageid: <>
2018-08-31 08:48:49methanelinkissue34538 messages
2018-08-31 08:48:48methanecreate