[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)
and without a complete list of all files, you can not do a useful sort.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: OpenPGP digital signature
More information about the rb-general