Does anyone have any further thoughts on these? Should I split these into separate threads?
On Sun, Nov 22, 2020 at 10:05 PM Todd <[email protected]> wrote: > On Sun, Nov 22, 2020 at 9:49 PM Matt Wozniski <[email protected]> wrote: > >> > I suggest adding an "exist_ok" argument to all of these, with >> > the default being "True" for backwards-compatibility. This argument >> name >> > is already in use elsewhere in pathlib. If this is False and the file >> is >> > not present, a "FileNotFoundError" is raised. >> >> For Path.mkdir, exist_ok=True inhibits an error if a directory already >> exists. >> You're proposing that for Path.is_dir, exist_ok=True should inhibit an >> error if >> the directory does not exist. >> >> A parameter to enable that behavior sounds reasonable to me, but it >> definitely >> shouldn't have the name "exist_ok"; it does the opposite of what exist_ok >> does. >> > > Good point, perhaps "missing_ok" then. >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/ATT5CC55ETKBVS26PXFUKUCC4OLNXGNL/ Code of Conduct: http://python.org/psf/codeofconduct/
