On Mon, May 13, 2019 at 9:24 PM Anders Hovmöller <bo...@killingar.net> wrote: > > On 13 May 2019, at 19:38, Steven D'Aprano <st...@pearwood.info> wrote: > >> On Mon, May 13, 2019 at 12:31:08PM +0200, Anders Hovmöller wrote: > >> An optional "overwrite_if_exists=False" flag seems much nicer. > > > > Aside from the argument name being too verbose, that violates the rule > > of thumb "avoid constant bool flags" design principle. > > Verbose is better than cryptic. Having the exact same name as something that > does something else is pretty cryptic.
As a regular library user, I see and expect no obvious difference between `os.symlink` and `shutil.symlink`. Probably they should have different names if the behavior is not the same. As a constant Linux user, I'd expect a `symlink` function to do something similar to `ln -s` which also could be used as `ln -sf`. So, something like `symlink(force:bool=False)` looks like an expected and "guessable". Thanks! _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/