Steven D'Aprano added the comment: I agree that the documentation could be improved, but it's not really *wrong*. Consider a glob like "spam/[abc]/*.txt". What iglob does is conceptually closer to:
(1) generate the list of files matching "spam/a/*.txt" and yield them; (2) generate the list of files matching "spam/b/*.txt" and yield them; (3) generate the list of files matching "spam/c/*.txt" and yield them rather than: (1) generate the list of files matching "spam/a/*.txt"; (2) append the files matching "spam/b/*.txt"; (3) append the files matching "spam/c/*.txt"; (4) finally yield them (see the source code here: http://hg.python.org/cpython/file/3.4/Lib/glob.py ). I think the documentation is trying to say that iglob doesn't *always* store all the matching files, without implying that it *never* stores all the matching files. I can't think of a clean way to explain that, so a doc patch is welcome. ---------- nosy: +steven.daprano _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22167> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com