“It was recently discovered that several thousand scientific articles could be invalid in their conclusions because scientists did not understand that Python’s glob.glob() does not return sorted results.”
I fin this kinda amusing but also pretty sad. I hope none of the research was in vain, and that they can recover useful results. I also hope that they learn from this and understand the importance of reading documentation.
On the other hand, if people routinely call a function expecting a different result it might also be poorly documented.
People call glob.glob() to get a sorted result, I’m assuming the thought that the results would be sorted didn’t just pop into their head from nowhere.
That’s true, but it says in the docs that glob.glob() doesn’t produce sorted results, but it’s very easy to assume that a function would always produce sorted results.