Barry A. Warsaw <ba...@python.org> added the comment:
Does a LBYL strategy actually fix the problem? E.g. what if the directory gets rm'd between __enter__ and __exit__? Maybe we shouldn't try to be clever at all and just leave it to the user to decide what to do, and how to handle any chdir-back failures? Keep it simple? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45545> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com