'Yields all subclasses of this class'

def get_subclasses(self):

    for (name, obj) in inspect.getmembers(sys.modules[__name__], predicate=self._is_subclass):
        if (hasattr(obj, '__bases__') and (self.__class__ in obj.__bases__)):
            (yield obj)
