[issue38764] Deterministic globbing.

Raymond Hettinger report at bugs.python.org
Mon Nov 11 15:43:51 EST 2019


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

ISTM that if glob had been sorted, it would have only thinly masked the data pipeline issues that were encountered.  The code would still have been easily broken by someone renaming, adding, or removing a file.  In their case, it was the semantic context of the files where the application order was important, the actual filenames were incidental to the bug.

Also having user depend on sorting may lead to other bugs as well.  1) Sorts in one version of Python but not another, 2) Sorts in some functions but not others, and 3) The sort is text based so that file1, file2, ..., file11, file12 don't sort as expected.

FWIW, I didn't put a strong -1.  However, the "sorting of discovered children" is a warning sign that we're doing too much.

----------

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


More information about the Python-bugs-list mailing list