
report at bugs
Aug 18, 2012, 8:14 AM
Post #10 of 11
(152 views)
Permalink
|
|
[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior
[In reply to]
|
|
Hynek Schlawack added the comment: Ok, let’s do it here, that’s easier: .. function:: makedirs(path, mode=0o777, exist_ok=False) .. index:: single: directory; creating single: UNC paths; and os.makedirs() Recursive directory creation function. Like :func:`mkdir`, but makes all intermediate-level directories needed to contain the leaf directory. The default *mode* is ``0o777`` (octal). On some systems, *mode* is ignored. Where it is used, the current umask value is first masked out. If the target directory exists, :exc:`OSError` is raised unless *exist_ok* is set to ``True`` and the mode doesn't contradict the designated mode as discussed in the previous paragraph. If the mode doesn't match, :exc:`OSError` is raised regardless of the value of *exist_ok*. If the directory cannot be created in other cases, an :exc:`OSError` exception is raised too. .. note:: :func:`makedirs` will become confused if the path elements to create include :data:`pardir`. This function handles UNC paths correctly. .. versionadded:: 3.2 The *exist_ok* parameter. Python is so much easier than English. :'( ---------- versions: +Python 3.4 _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue13498> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|