[docs] [issue33275] glob.glob should explicitly note that results aren't sorted

Ben FrantzDale report at bugs.python.org
Wed May 2 10:03:26 EDT 2018


Ben FrantzDale <ben at formlabs.com> added the comment:

I looked into it a bit more. With python 2.7 on macOS High Sierra on APFS (Encrypted) with a FAT32 thumb drive... I have a directory that glob.glob('/Volumes/thumb/tmp/*') shows as sorted. I cp -r that to /tmp with bash. glob.glob('/tmp/tmp/*') is now not sorted. and cp -r /tmp/tmp /Volumes/thumb/tmp1. Then glob.glob('/Volumes/thumb/tmp/*') shows a different order, but if I cp -r /Volumes/thumb/tmp/ /Volumes/thumb/tmp2 then glob.glob('/Volumes/thumb/tmp2/*') is sorted by file name just like glob.glob('/Volumes/thumb/tmp/*'). I'm not sue what that's saying other than that glob.glob can return things out of order on FAT32. It appears that glob.glob's ordering agrees with that of ls -f ("unsorted").

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33275>
_______________________________________


More information about the docs mailing list