On Tue, Jul 20, 2010 at 3:57 PM, Julian Edwards
<[email protected]> wrote:
> On Tuesday 20 July 2010 10:36:51 Jonathan Lange wrote:
...
>> with celebrity_logged_in('admin'):
>>     ubuntu.name = 'jonobuntu'
...
>
> This is very cool, thanks Jono.
>
> What happens when the 'with' block finishes, does it log out or do nothing
> special?
>

If you were logged out before, it logs you out. If you were logged in
(even as ANONYMOUS), it logs you in with the previously logged-in
account.

In other words, your login state after the with block is exactly the
same as before the with block.

jml

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to