[rb-general] patching python glob

Bernhard M. Wiedemann bernhardout at lsmod.de
Wed May 24 11:58:58 CEST 2017


On 2017-05-24 11:10, Peter Stuge wrote:
> So the default for glob() *is* to sort. Doesn't Python use the default
> when calling glob()? I do think it would make sense to use the default
> also by default in Python.

The python glob module also implements an 'iglob' returning an iterator
so you can process files in a loop without having a list of all of them
and that might be why they use scandir(3)
https://github.com/python/cpython/blob/master/Lib/glob.py#L121

and without a complete list of all files, you can not do a useful sort.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20170524/4e307121/attachment.sig>


More information about the rb-general mailing list