Message225050
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. |
|
Date |
User |
Action |
Args |
2014-08-08 01:59:25 | steven.daprano | set | recipients:
+ steven.daprano, roysmith, docs@python, Gumnos |
2014-08-08 01:59:25 | steven.daprano | set | messageid: <1407463165.54.0.126138523997.issue22167@psf.upfronthosting.co.za> |
2014-08-08 01:59:25 | steven.daprano | link | issue22167 messages |
2014-08-08 01:59:25 | steven.daprano | create | |
|