Closed
Description
Documentation
In os.mkdir
, when the argument mode
is used, the current umask value is first masked out of it. This behavior is mentioned in the library's documentation, but not in the docstring.
This behavior may be unexpected for some (for example, this is not the behavior of GNU's mkdir
command - when a mode is explicitly given to it, it overrides the umask). When one is unaware of this behavior, it can lead to bugs that are difficult to notice or trace. For these two reasons, I suggest it will be mentioned in the docstring.
My edit suggestion is given in #96271.
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
os.mkdir
's docstring. #96271gh-96288: Add a sentence to `os.mkdir`'s docstring. (#96271)
[3.11] pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (pyt…
os.mkdir
's docstring. (GH-96271). #98065os.mkdir
's docstring. (GH-96271). #98066[3.10] pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (pyt…
[3.10] gh-96288: Add a sentence to `os.mkdir`'s docstring. (GH-96271). (
[3.11] gh-96288: Add a sentence to `os.mkdir`'s docstring. (GH-96271). (
Merge branch 'main' into typewatch
pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (python#96271)
hauntsaninja commentedon Oct 11, 2022
Thanks, looks like this has been completed