Brian Curtin <cur...@acm.org> added the comment: -0 for having os.chdir be responsible for the previous directory. I'm not too much against this, but it's very easily done in it's current state.
-1 for making os.chdir into a context manager which reverts itself upon exit. There are a number of race conditions this would have to handle and I think it's better for something like this to be implemented by the user. For example, if the original directory gets removed while you are within the block, what is the best fallback directory to change to upon exit? For the standard library, I don't think we can answer that. ---------- nosy: +brian.curtin _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9097> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com