()
return name
Create a random filename for the shared memory object.
Create a random filename for the shared memory object.
Create a random filename for the shared memory object .
def _make_filename():
    "Create a random filename for the shared memory object."
    # number of random bytes to use for name
    nbytes = (_SHM_SAFE_NAME_LENGTH - len(_SHM_NAME_PREFIX)) // 2
    assert nbytes >= 2, '_SHM_NAME_PREFIX too long'
    name = _SHM_NAME_PREFIX + secrets.token_hex(nbytes)
    assert len(name) <= _SHM_SAFE_NAME_LENGTH
    return name
def _make_filename ( ) : # number of random bytes to use for name nbytes = ( _SHM_SAFE_NAME_LENGTH - len ( _SHM_NAME_PREFIX ) ) // 2 assert nbytes >= 2 , '_SHM_NAME_PREFIX too long' name = _SHM_NAME_PREFIX + secrets . token_hex ( nbytes ) assert len ( name ) <= _SHM_SAFE_NAME_LENGTH return name