-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
bpo-37609: Add device path support in ntpath splitdrive #14841
bpo-37609: Add device path support in ntpath splitdrive #14841
Conversation
f69464e
to
589e045
Compare
@@ -0,0 +1 @@ | |||
Add support for unc device path in :mod:`ntpath.splitdrive` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the mod role here is not correct. Please see https://devguide.python.org/documenting/#id4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've updated it to use meth
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be func
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've updated it
e92813b
to
eb4e996
Compare
Sorry for not seeing this earlier, I have a few general suggestions:
|
return p[:2], p[2:] | ||
return p[:0], p | ||
|
||
|
||
def is_unc_path(path, sep): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions are clearly private (e.g. parameterized by sep
and colon
), so the function names should have a leading underscore.
working on it |
For an alternate and more complete implementation, see the splitdrive.py file that I attached to bpo-37609. |
I managed to fix the issue elsewhere (in #91882), so I'm going to close this PR, but thank you very much for taking a look at it! :) |
Add device path support in
ntpath.splitdrive
https://bugs.python.org/issue37609