-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pathlib's Path.mkdir() should allow for "mkdir -p" functionality #65738
Comments
As of Python 3.2, However, this functionality is missing in Python's new pathlib. In fact, the documentation for I propose that either |
I think we can a new |
I've just been writing some new code to use pathlib and ran into this one myself. An exist_ok=False is fine, although it's a slight shame that for backward compatibility we can't adopt os.makedirs() signature exactly. |
Le 27/05/2014 20:32, Barry A. Warsaw a écrit :
What do you mean by that? The os.makedirs() signature is |
On May 27, 2014, at 08:48 PM, Antoine Pitrou wrote:
Right, but this is Path.mkdir's signature: Path.mkdir(mode=0o777, parents=False) so it's too late to make exist_ok=False the second argument (i.e. the one |
Updated patch. Thank you Barry and Antoine. |
I like it. Thanks for the contribution! Assigning to myself since I plan on working to land this in 3.5. |
New changeset 8af80d68bcdc by Barry Warsaw in branch 'default':
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: