← Back to team overview

launchpad-dev team mailing list archive

Re: The with statement

 

On Thu, 11 Feb 2010 09:38:11 Robert Collins wrote:
> On Wed, 2010-02-10 at 14:42 -0500, Barry Warsaw wrote:
> >     with cwd('/path/to/stuff'):
> >         # ...
> >
> > is pretty obvious.
> 
> And extremely dangerous, as well as trivially broken. Not safe to use
> from any server code.
> 
> (And if its not obvious why its dangerous or breakable, that should
> serve as pause!)

I'm hoping that someone would write a context where it returns you to the 
current working directory on exit.

Rob, is that what you were referring to?

Tim



References