R. David Murray <rdmur...@bitdance.com> added the comment:

In addition, os functions tend to be thin wrappers around system functions, and 
the system chdir does not return the cwd.  Thus we'd be adding code to chdir 
that would be executed every time it was called even though it would only be 
used occasionally.  Given that it only saves one line of python code in those 
same restricted cases, this does not seem like a sensible addition.

You can, of course, write your own function that does this.

The same is true of the idea of a chdir context manager: you can trivially 
write your own if you don't care about the issues Brian raised.  If you do care 
then we'd have to figure out how to handle those issues.  And how to handle 
them is different on different OSes (and I'm not just talking about windows vs 
posix, either; what happens when you delete the cwd differs on the different 
unix flavors).

----------
nosy: +r.david.murray

_______________________________________
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

Reply via email to