def supports(codec):
    """
    Return a list of strings indicating supported operations.
    """
    if hasattr(codec, 'encode') and hasattr(codec, 'decode'):
        return ['encoding', 'decoding']
    elif hasattr(codec, 'encode'):
        return ['encoding']
    elif hasattr(codec, 'decode'):
        return ['decoding']
    return codec.supports
