def _hashable_bytes(data):
    """
    Coerce strings to hashable bytes.
    """
    if isinstance(data, bytes):
        return data
    elif isinstance(data, str):
        return data.encode('ascii')  # Fail on anything non-ASCII.
    else:
        raise TypeError(data)
def _hashable_bytes(data):
    
    if isinstance(data, bytes):
        return data
    elif isinstance(data, str):
        return data.encode('ascii')  
    else:
        raise TypeError(data)
def _hashable_bytes ( data ) : if isinstance ( data , bytes ) : return data elif isinstance ( data , str ) : return data . encode ( 'ascii' ) # Fail on anything non-ASCII. else : raise TypeError ( data )
Coerce strings to hashable bytes.
Coerce strings to hashable bytes .