[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

Ray.Allen report at bugs.python.org
Tue Jul 27 05:36:47 CEST 2010

Ray.Allen <ysj.ray at gmail.com> added the comment:

I want to explain "mkdir -p" as this:

We want to create a specified directory, if such a directory doesn't exist, then create it. If such a directory already exists, then we have already reached our goal, do nothing.

While we port this function to os.makedir(), there is a more specified information of the target directory, the "mode". If the target directory already exists but with a different mode, we need not create it, but we haven't reach our goal, yet. So we can raise a exception.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list