Python has its own history at this point. UNIX history is to Python history as the history of the Red Delicious apple is to the history of the Honeycrisp.
There has also been 50 years of computing history, during which globbing has been implemented several times with different behaviors in several tools. And in that time, filesystems have changed pretty significantly as well.
It is incorrect to extrapolate from the fact that “things were sorted in UNIX in 1972” to the claim that “things have been sorted for 50 years across all *nix environments”.
Python has a 35 year history of not sorting glob.glob.
Is this really the argument you want to make anyway? Do the users who are expecting stable output have that expectation because they’ve used and relied on other tools with sorted output and never used any, excepting Python, which do not sort?
I think it’s a lot more likely that people make this mistake because they simply haven’t thought about it yet; they don’t even realize they are making an assumption.
Following the UNIX principle of “do one job well”, glob output should not be sorted.
Principles can be genuinely useful, but they are not an argument in their own right. They usually encode a number of assumptions.
You are assuming that sorted output is “less surprising”. I would find it surprising if glob.glob started spending time doing sorting that I do not expect or want.
I urge you not to say “right/wrong” simply because it results in yes/no answers.
Are the users right? No. The docs clearly stated that they are not. Their assumptions were wrong.
An unsympathetic reading ends there.
But, could Python do more to accommodate these users? Yes! We should be enthusiastic about finding a way to improve it if and when someone makes a good case for it.
Python, as a complete product, includes its documentation. And the docs have already gotten an adjustment in response to this thread. So we have improved Python already. (And kudos to the PR author and reviewers!)
Maybe there should be further refinement. But I’m not finding a convincing argument here. People make mistakes, and ideally they learn from them. Why is this mistake, which is addressed directly in the docs, special?