def get_swap_path(path):
    """Return new path representing swap file of given path.

    Parameters
    ==========
    path (pathlib.Path instance)
        path used as base to form the swap path.

    The new path uses a vim-like way of naming swap
    files: make the file hidden by adding a dot ('.') to
    the filename and add a '.swp' extension after the
    existing extension.
    """
    ### hide path
    hidden_path = path.with_name("." + path.name)

    ### add suffix
    hidden_swap_path = Path(str(hidden_path) + ".swp")

    return hidden_swap_path
Return new path representing swap file of given path.

    Parameters
    ==========
    path (pathlib.Path instance)
        path used as base to form the swap path.

    The new path uses a vim-like way of naming swap
    files: make the file hidden by adding a dot ('.') to
    the filename and add a '.swp' extension after the
    existing extension.
    
nodezator/ourstdlibs/path.py