You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ntpath.expanduser(), _get_bothseps() is called in every loop iteration. It should be assigned instead:
if isinstance(path, bytes):
+ seps = b'\\/'
tilde = b'~'
else:
+ seps = '\\/'
tilde = '~'
if not path.startswith(tilde):
return path
i, n = 1, len(path)
-while i < n and path[i] not in _get_bothseps(path):+while i < n and path[i] not in seps:
i += 1
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Feature or enhancement
Proposal:
In
ntpath.expanduser()
,_get_bothseps()
is called in every loop iteration. It should be assigned instead: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
The text was updated successfully, but these errors were encountered: