On Nov 27, 2015, at 10:32, Paul Moore firstname.lastname@example.org wrote:
On 26 November 2015 at 23:22, Erik email@example.com wrote: I have studied the PEP, followed a lot of the references and looked at the 3.5.0 implementation. I can't see that I've missed such a thing already existing, but it's possible. If so, perhaps this is instead a request to make that thing more obvious somehow!
Does pathlib use scandir? If so, then maybe you get the caching benefits by using pathlib? And if pathlib doesn't use scandir, maybe it should? [I just checked, it looks like pathlib doesn't use scandir :-(]
Does pathlib even have a walk equivalent? (I know it has glob('**'), but that's not the same thing.)
Or are you suggesting that people should use path.iterdir with explicit recursion (or an explicit stack), and therefore just changing iterdir to use scandir (and prefill as many cached attribs as possible in each result) is what we want?