[Python-Dev] requirements for moving __import__ over to importlib?

Chris Angelico rosuav at gmail.com
Sat Feb 11 01:49:53 CET 2012


On Sat, Feb 11, 2012 at 11:23 AM, PJ Eby <pje at telecommunity.com> wrote:
> What's the downside in that case?  You're trying to import something that
> just changed in the last fraction of a second...  why?

I don't know if it's normal in the Python world, but these sorts of
race conditions occur most annoyingly when a single process changes a
file, then attempts to import it. If you open a file, write to it,
explicitly close it, and then load it, you would expect to read back
what you wrote, not the version that was there previously.

Chris Angelico


More information about the Python-Dev mailing list