Recursively gather subclasses of cls.

def subclasses(cls, lst=None):
    '''Recursively gather subclasses of cls.
    '''
    if lst is None:
        lst = []
    for sc in cls.__subclasses__():
        if sc not in lst:
            lst.append(sc)
        subclasses(sc, lst=lst)
    return lst