On 4/29/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> [Phillip J. Eby]
> > Although I'd personally prefer a no-keyword approach:
> >
> >      synchronized(self):
> >          with_file("foo") as f:
> >              # etc.
> 
> I'd like that too, but it was shot down at least once. Maybe we can
> resurrect it?
> 
>     opening("foo") as f:
>         # etc.
> 
> is just a beauty!
> 

Yes. I like it.

EXPRESSION [as VAR]:
    BLOCK

lock(self._monitor): # typing synchronized freaks me out
    spam()

using(DB.open()) as conn:
    eggs(conn)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to