We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sep
posixpath.expanduser()
We can replace root with the already assigned sep from earlier:
root
if isinstance(path, bytes): userhome = os.fsencode(userhome) - root = b'/' -else: - root = '/' -userhome = userhome.rstrip(root) -return (userhome + path[i:]) or root +userhome = userhome.rstrip(sep) +return (userhome + path[i:]) or sep
This is a minor feature, which does not need previous discussion elsewhere
_get_[both]sep[s]()
os.path
The text was updated successfully, but these errors were encountered:
gh-118119: Re-use sep in posixpath.expanduser() (GH-118120)
6f768b7
pythongh-118119: Re-use sep in posixpath.expanduser() (pythonGH-1…
f4dc046
…18120)
No branches or pull requests
Feature or enhancement
Proposal:
We can replace
root
with the already assignedsep
from earlier:Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
_get_[both]sep[s]()
calls inos.path
#117634Linked PRs
sep
inposixpath.expanduser()
#118120The text was updated successfully, but these errors were encountered: