From: Etienne Gautier Date: Mon, 26 Apr 2021 04:21:50 +0000 (+0200) Subject: documentation: clarification about the function remove in os library (GH-19024) X-Git-Tag: v3.10.0b1~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6daab2f676de1773d8f35fb362fe4c57449301d;p=thirdparty%2FPython%2Fcpython.git documentation: clarification about the function remove in os library (GH-19024) --- diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 574aa2e6471a..b4c2ca9d4f66 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2247,6 +2247,7 @@ features: Remove (delete) the file *path*. If *path* is a directory, an :exc:`IsADirectoryError` is raised. Use :func:`rmdir` to remove directories. + If the file does not exist, a :exc:`FileNotFoundError` is raised. This function can support :ref:`paths relative to directory descriptors `.