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
pathlib.Path.iterdir()
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2022-01-20.19:20:39.376> created_at = <Date 2022-01-09.14:52:52.043> labels = ['library', '3.11'] title = 'Optimize pathlib.Path.iterdir()' updated_at = <Date 2022-01-20.19:20:39.376> user = 'https://github.com/barneygale'
bugs.python.org fields:
activity = <Date 2022-01-20.19:20:39.376> actor = 'zach.ware' assignee = 'none' closed = True closed_date = <Date 2022-01-20.19:20:39.376> closer = 'zach.ware' components = ['Library (Lib)'] creation = <Date 2022-01-09.14:52:52.043> creator = 'barneygale' dependencies = [] files = [] hgrepos = [] issue_num = 46316 keywords = ['patch'] message_count = 2.0 messages = ['410154', '411042'] nosy_count = 2.0 nosy_names = ['zach.ware', 'barneygale'] pr_nums = ['30501'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue46316' versions = ['Python 3.11']
The text was updated successfully, but these errors were encountered:
pathlib.Path.iterdir() contains the following code:
if name in {'.', '..'}: # Yielding a path object for these makes little sense continue
This check is unnecessary as os.listdir() does not return entries for '.' or '..':
os.listdir(path='.') 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
See https://docs.python.org/3/library/os.html#os.listdir
Sorry, something went wrong.
New changeset a1c8841 by Barney Gale in branch 'main': bpo-46316: optimize pathlib.Path.iterdir() (GH-30501) a1c8841
No branches or pull requests
pathlib.Path.iterdir()
#30501Note: 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: