[issue46316] Optimize pathlib.Path.iterdir()

2022-01-20 Thread Zachary Ware


Change by Zachary Ware :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46316] Optimize pathlib.Path.iterdir()

2022-01-20 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset a1c88414926610a3527398a478c3e63c531dc742 by Barney Gale in branch 
'main':
bpo-46316: optimize `pathlib.Path.iterdir()` (GH-30501)
https://github.com/python/cpython/commit/a1c88414926610a3527398a478c3e63c531dc742


--
nosy: +zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46316] Optimize pathlib.Path.iterdir()

2022-01-09 Thread Barney Gale


Change by Barney Gale :


--
keywords: +patch
pull_requests: +28707
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30501

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46316] Optimize pathlib.Path.iterdir()

2022-01-09 Thread Barney Gale


New submission from Barney Gale :

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

--
components: Library (Lib)
messages: 410154
nosy: barneygale
priority: normal
severity: normal
status: open
title: Optimize pathlib.Path.iterdir()
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com