From: Senthil Kumaran Date: Mon, 26 Apr 2021 04:30:32 +0000 (-0700) Subject: [3.9] documentation: clarification about the function remove in os library (GH-19024... X-Git-Tag: v3.9.5~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=debb23fae6dd77d2f3b7d888f40c5f20fbc6ba72;p=thirdparty%2FPython%2Fcpython.git [3.9] documentation: clarification about the function remove in os library (GH-19024) (GH-25620) (cherry picked from commit b6daab2f676de1773d8f35fb362fe4c57449301d) Co-authored-by: Etienne Gautier --- diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 2aea2105c364..0c6f0b86cd74 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2115,6 +2115,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 `.