Robin Munn wrote:

[snip]

Another possibility just occurred to me. How about "using"?

~    using EXPR as VAR:
~        BLOCK


Examples from PEP 340: ==========

def synchronized(lock):
...
using synchronized(myLock):
...
===== (+0)

def opening(filename, mode="r"):
...
using opening("/etc/passwd") as f:
...
===== (+1)

def auto_retry(n=3, exc=Exception):
...
using auto_retry(3, IOError):
...
===== (+1)
def synchronized_opening(lock, filename, mode="r"):
...
using synchronized_opening("/etc/passwd", myLock) as f:
...
===== (+1)

A.R.

_______________________________________________
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