> I don't know how compelling it is, but the dirread Plan 9 call to get > a directory listing > (http://plan9.bell-labs.com/magic/man2html/2/dirread) returns only a > subset of the entries in the directory so it effectively acts as an > iterator.
All operating system APIs to read directories work in this way; Plan 9 is not unique (here). > If it's listing a network shared file system an iterator > version of listdir could result in less network traffic depending on > what entry you were looking for. I don't know if NFS is the same but > I think in general it would be a win for network file systems in terms > of efficiency. Still, Guido's question stands: do you have an actual use case where you would want to stop earlier? Even if you glob, you still need to read to the end of the directory. Regards, Martin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com