This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients adelfino, serhiy.storchaka, vstinner
Date 2018-05-08.05:47:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1525758440.99.0.682650639539.issue33414@psf.upfronthosting.co.za>
In-reply-to
Content
The code with using scandir() is more complex and is different enough from the code with using listdir() for having significant risk of introducing bugs. Also using scandir() introduces a risk of leaking file descriptors.

We don't rewrite the code without good reasons. If you propose performance enhancement, please provide benchmark results that expose the benefit of this change. If it is not large enough, it is not worth to do.

Actually your change looks making the code slower: it reads the directory twice.
History
Date User Action Args
2018-05-08 05:47:21serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, adelfino
2018-05-08 05:47:20serhiy.storchakasetmessageid: <1525758440.99.0.682650639539.issue33414@psf.upfronthosting.co.za>
2018-05-08 05:47:20serhiy.storchakalinkissue33414 messages
2018-05-08 05:47:20serhiy.storchakacreate