bpo-46148: optimize pathlib.Path.iterdir()#30492
Closed
barneygale wants to merge 1 commit intopython:mainfrom
Closed
bpo-46148: optimize pathlib.Path.iterdir()#30492barneygale wants to merge 1 commit intopython:mainfrom
pathlib.Path.iterdir()#30492barneygale wants to merge 1 commit intopython:mainfrom
Conversation
`os.listdir()` doesn't return entries for `.` or `..`, so we don't need to check for them here.
sobolevn
reviewed
Jan 9, 2022
Member
There was a problem hiding this comment.
Thanks for the patch!
However, I think it needs a new issue, because the one you link is closed. And it didn't state anything about the problem you are fixing.
I think this might be useful for the new issue:
https://docs.python.org/3/library/os.html#os.listdir
Return a list containing the names of the entries in the directory given by path. The list is in arbitrary order, and does not include the special entries '.' and '..' even if they are present in the directory.
You would also need to add a NEWS file. See https://github.com/larryhastings/blurb or https://blurb-it.herokuapp.com/
Contributor
Author
|
Thanks - I'll close this PR and re-create. |
Contributor
Author
|
New PR: #30501 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
os.listdir()doesn't return entries for.or.., so we don't need tocheck for them here.
https://bugs.python.org/issue46148