This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients brian.curtin, orsenthil, r.david.murray, techtonik
Date 2010-06-28.17:40:03
SpamBayes Score 0.0070117335
Marked as misclassified No
Message-id <1277746805.8.0.585648102447.issue9097@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2010-06-28 17:40:05r.david.murraysetrecipients: + r.david.murray, orsenthil, techtonik, brian.curtin
2010-06-28 17:40:05r.david.murraysetmessageid: <1277746805.8.0.585648102447.issue9097@psf.upfronthosting.co.za>
2010-06-28 17:40:04r.david.murraylinkissue9097 messages
2010-06-28 17:40:03r.david.murraycreate