class MyException(Exception): """You can put code here""" pass class MyOtherException(MyException): """You can also put code here""" pass