2 ms·
Python 3.13 – Improved Error Messages
- zahlman 2y ago>A common mistake is to write a script with the same name as a standard library module. I'm very happy to see this, since it's a common problem that can manifest in a lot of unexpected ways (see e.g. https://stackoverflow.com/questions/36250353 https://stackoverflow.com/questions/36250353 . Did you know that having a `token.py` in the current working directory can break the interactive help?) It would be better if the standard library were namespaced - that would sidestep the problem elegantly (and also allow code within the standard library to use relative imports everywhere). But I suppose it's decades too late for a backwards compatibility break of that magnitude.