[Python-ideas] PEP471 - (os.scandir())
Andrew Barnert
abarnert at yahoo.com
Mon Nov 30 11:18:25 EST 2015
On Nov 30, 2015, at 01:40, Paul Moore <p.f.moore at gmail.com> wrote:
>
>> On 30 November 2015 at 09:12, Andrew Barnert <abarnert at yahoo.com> wrote:
>> I still think providing an fts-like API instead of os.walk would be the clearest way to provide cached data (especially since people could look up nice generic documentation on fts).
>
> As a Windows user I'm not familiar with fts (and Google didn't come up
> with anything obvious).
The perils of acronym-based naming; it's very easy to go from one of two meaningful search results to way down the list just because UrbanDictionary popularized some txt speak slang and wikipedia started covering every government agency in the world with its name translated to English...
So you're right, that benefit no longer applies. You can still find "man fts" very easily, but that isn't what people would be looking for, and doesn't find any of the user-friendly tutorials, just the manpage.
> So I'm not sure how true "people could look up
> generic docuimentation" would be in practice. But from your
> description it may be useful - I presume it's something that could be
> built as a 3rd party library based on os.scandir, at least as an
> initial proof of concept?
A complete implementation that supported all of the flags and maintained the appropriate performance guarantees might be hard. But a partial implementation that supports just the most common flags and falls back to "stat everything, sometimes twice" as a proof of concept should be doable, once I get some free time.
More information about the Python-ideas
mailing list