> 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. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/YRSKCKBSTHKW2WPVUG2VQSCFV4M7X3O3/ Code of Conduct: http://python.org/psf/codeofconduct/