[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Thu, Aug 05, 2021 at 12:00:31PM +, krey wrote: > @steven.daprano My suggestion was changing the names of the args, not the > order > > Current > def os.symlink(src, dst): > ln -s src dst So far so good. > Changing the names > def

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: There is no one single set of names used by `ln` that we could have chosen. Any choice we made would have annoyed some people. I strongly argue that, of all the various naming conventions in common usage (see below), Python's choice of src, dest (source,

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
krey added the comment: @eric.smith Fair enough, though the impact would probably be quite low in reality. Nobody seems to pass these args by keyword: https://github.com/search?q=%22os.symlink(src%3D%22=Code @steven.daprano My suggestion was changing the names of the args, not the order

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: There's really no way we'd consider breaking possibly millions of working programs to change the parameter names. I guess you could come up with some way of supporting both sets of parameter names, but I doubt we'd accept that, either. While maybe in

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Yes, we have a process: - At least one full release with a pending deprecation warning (silent by default); 3.11 is the earliest that could take place. - At least one full release with an active deprecation warning; 3.12 would be the earliest for this.

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
krey added the comment: @eric.smith Sorry for tagging this as docs, wasn't sure what to pick. I guess it should be under Library Does CPython have a process for changing arg names via deprecation warnings? -- ___ Python tracker

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: @krey: What's your suggested change? We can change neither the parameter order nor parameter names without breaking code, so that won't happen. You created this as a documentation issue. Do you have a suggested documentation change? -- nosy:

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Order of arguments for ln: ln -s SOURCE DESTINATION Order of arguments for os.symlink: os.symlink(SOURCE, DESTINATION) They are exactly the same order. > Everywhere else I've seen, arrows (or directed edges in a graph) point as > SOURCE -> TARGET

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
krey added the comment: OK, let's ignore the analogy. Everywhere else I've seen, arrows (or directed edges in a graph) point as SOURCE -> TARGET SOURCE -> DESTINATION (TARGET and DESTINATION are synonymous in this context) An example from math:

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Steven D'Aprano
Steven D'Aprano 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

[issue44837] os.symlink arg names are bad

2021-08-05 Thread krey
New submission from krey : From: https://docs.python.org/3/library/os.html os.symlink(src, dst, target_is_directory=False, *, dir_fd=None) Create a symbolic link pointing to `src` named `dst`. It's a bit like saying find(needle, haystack) Finds `haystack` in `needle` If you look