[issue11406] There is no os.listdir() equivalent returning generator instead of list

Martin v. Löwis report at bugs.python.org
Mon Mar 25 00:04:14 CET 2013


Martin v. Löwis added the comment:

Since this is going to be a new API, I would like to return the file type per directory entry where supported. I suggest to start with the Linux set of file types (DT_BLK, ..., DT_UNKNOWN), perhaps under different names, giving 'unknown' on systems which don't support this.

People traversing a directory tree can then skip the stat call if it's neither 'directory' nor 'unknown'.

----------

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


More information about the Python-bugs-list mailing list