A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-July/135456.html below:

[Python-Dev] Updates to PEP 471, the os.scandir() proposal

[Python-Dev] Updates to PEP 471, the os.scandir() proposal [Python-Dev] Updates to PEP 471, the os.scandir() proposalBen Hoyt benhoyt at gmail.com
Fri Jul 11 13:12:59 CEST 2014
[replying to python-dev this time]

>> The "onerror" approach can also deal with readdir failing, which the
>>  PEP currently glosses over.
>
>
> Do we want this, though?  I can see an error handler for individual entries,
> but if one of the *dir commands fails that would seem to be fairly
> catastrophic.

Very much agreed that this isn't necessary for just readdir/FindNext
errors. We've never had this level of detail before -- if listdir()
fails half way through (very unlikely) it just bombs with OSError and
you get no entries at all.

If you really really want this (again very unlikely), you can always
use call next() directly and catch OSError around that call.

-Ben
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4