[issue28530] Howto detect if an object is of type os.DirEntry

Josh Rosenberg report at bugs.python.org
Tue Oct 25 22:34:00 EDT 2016


Josh Rosenberg added the comment:

Eryk: With the fixes for issue25994 and issue26603, you'd want to use a with statement for the scandir; the use pattern in that example is guaranteed to cause a ResourceWarning on any directory with more than one entry.

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28530>
_______________________________________


More information about the Python-bugs-list mailing list