def typelogged_class(cls):
    """Works like typelogged, but is only applicable to classes.
    """
    if not pytypes.typelogging_enabled:
        return cls
    assert(isclass(cls))
    # To play it safe we avoid to modify the dict while iterating over it,
    # so we previously cache keys.
    # For this we don't use keys() because of Python 3.
    # Todo: Better use inspect.getmembers here
    keys = [key for key in cls.__dict__]
    for key in keys:
        memb = cls.__dict__[key]
        if _check_as_func(memb):
            setattr(cls, key, typelogged_func(memb))
        elif isclass(memb):
            typelogged_class(memb)
    return cls
Works like typelogged, but is only applicable to classes.