Re: [Python-Dev] Improvements for Pathlib

2014年11月08日 19:38:01 -0800

On 08Nov2014 17:46, Ionel Cristian Mărieș <[email protected]> wrote:
#2. A context manager for changing working directory (that switches to the
old cwd on exit). Eg:
with path.cd():
assert os.getcwd() == path
As elsewhere remarked, the current working directory is process global state. Changing it can easily have unwanted (and invisible until breakage becomes glaring) side effects.
-1 on this element from me I'm afraid.
Cheers,
Cameron Simpson <[email protected]>
I couldn't think of anything else to do with it, so I put it on the web.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to