Thousands of Scientific Papers May be Invalid Due to Misunderstanding Python

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.

This is being reported on by Vice, Slashdot and there's an interesting discussion going on over on Reddit as well.

Some are reporting this as a glitch in Python, but glob has never guaranteed that is results were returned sorted. As always, I would recommend reading the documentation closely to fully understand what your code does. It would also be a good idea if you can write tests around your code. Python includes a unittest module which makes this easier.

Copyright © 2024 Mouse Vs Python | Powered by Pythonlibrary