import inspect


def classes_in_module(module):
    """Returns a generator over the classes defined in :obj:`module`."""
    return (symbol for symbol in dir(module)
            if inspect.isclass(getattr(module, symbol)))