[Python-checkins] bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError (GH-31548)

iritkatriel webhook-mailer at python.org
Mon Mar 14 15:57:23 EDT 2022


https://github.com/python/cpython/commit/879fbd9472753149b627f32add3ddca90ac47ab7
commit: 879fbd9472753149b627f32add3ddca90ac47ab7
branch: main
author: slateny <46876382+slateny at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2022-03-14T19:57:10Z
summary:

bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError (GH-31548)

files:
M Doc/library/os.rst

diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 6dffc4513365e..05e0303614ed1 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2050,7 +2050,8 @@ features:
 
    Create a directory named *path* with numeric mode *mode*.
 
-   If the directory already exists, :exc:`FileExistsError` is raised.
+   If the directory already exists, :exc:`FileExistsError` is raised. If a parent
+   directory in the path does not exist, :exc:`FileNotFoundError` is raised.
 
    .. _mkdir_modebits:
 



More information about the Python-checkins mailing list