launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #02514
Re: The with statement
-
To:
launchpad-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Tim Penhey <tim@xxxxxxxxxx>
-
Date:
Thu, 11 Feb 2010 10:30:29 +1300
-
In-reply-to:
<1265834291.12636.91.camel@lifeless-64>
-
User-agent:
KMail/1.12.2 (Linux/2.6.31-17-generic; KDE/4.3.2; x86_64; ; )
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