StandardError in Python 2 -> 3

Ian Kelly ian.g.kelly at
Sat Nov 17 02:51:53 CET 2012

On Fri, Nov 16, 2012 at 6:30 PM, Steven D'Aprano
<steve+comp.lang.python at> wrote:
> Does anyone use StandardError in their own code? In Python 2, I normally
> inherit from StandardError rather than Exception. Should I stop and just
> inherit from Exception in both 2 and 3?

According to the docs, StandardError is for built-in exceptions, and
user-defined exceptions are meant to inherit from Exception.

More information about the Python-list mailing list