[Python-Dev] Acquire/release functionality (Was: Extended Function syntax)

john paulson munch@acm.org
Mon, 03 Feb 2003 10:41:27 -0800


In the case of

with var_1, ... var_N = expr_1, ... expr_N:
   suite

What happens if one of the expr_k throws an
exception?  Have any of the var_k been
__enter__()'ed and consequently require an
__exit__()?  Also, I imagine this form does
not imply an ordering of binding (it acts
like a (let ((var_1 expr_1) ... (var_N exprN)) ...)
form in scheme).

In the interests of KISS, (with a soupcon of
YAGNI), the single variable form might be
preferable.
--