(str)
r"""Quote a string for use in a cookie header.

    If the string does not need to be double-quoted, then just return the
    string.  Otherwise, surround the string in doublequotes and quote
    (with a \) special characters.
r"""Quote a string for use in a cookie header.
r Quote a string for use in a cookie header .
def _quote(str):
    r"""Quote a string for use in a cookie header.

    If the string does not need to be double-quoted, then just return the
    string.  Otherwise, surround the string in doublequotes and quote
    (with a \) special characters.
    """
    if str is None or _is_legal_key(str):
        return str
    else:
        return '"' + str.translate(_Translator) + '"'
def _quote ( str ) : if str is None or _is_legal_key ( str ) : return str else : return '"' + str . translate ( _Translator ) + '"'