[issue44837] os.symlink arg names are bad

Steven D'Aprano report at bugs.python.org
Thu Aug 5 05:28:05 EDT 2021


Steven D'Aprano <steve+python at pearwood.info> added the comment:

There is nothing wrong with saying

    Create a symbolic link pointing to `src` named `dst`.

That is grammatically correct English.

We could say "create a sym link called dst pointing to src" but they mean exactly the same thing. And given that the order of parameters is src first and dst second, it makes more sense to keep the same order in the description.

Your analogy with

    Finds `haystack` in `needle`

is not correct. The analogy would be 


    find(needle, haystack)
    -> Finds `needle` in `haystack`
    -> or search haystack for needle

    os.symlink(src, dst)
    -> create symlink pointing to source called dst
    -> or create symlink called dst pointing to src


The order of arguments is the same as for ln:

    ln [OPTION]... [-T] TARGET LINK_NAME

TARGET is src, LINK_NAME is dst.


I don't think that there is anything needed to be done here.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44837>
_______________________________________


More information about the Python-bugs-list mailing list