diff --git a/pep-0343.txt b/pep-0343.txt index 48680dc31..2322b1dd8 100644 --- a/pep-0343.txt +++ b/pep-0343.txt @@ -207,8 +207,12 @@ Specification: The 'with' Statement BLOCK Here, 'with' and 'as' are new keywords; EXPR is an arbitrary - expression (but not an expression-list) and VAR is an arbitrary - assignment target (which may be a comma-separated list). + expression (but not an expression-list) and VAR is a single + assignment target. It can *not* be a comma-separated sequence of + variables, but it *can* be a *parenthesized* comma-separated + sequence of variables. (This restriction makes a future extension + possible of the syntax to have multiple comma-separated resources, + each with its own optional as-clause.) The "as VAR" part is optional. @@ -573,7 +577,7 @@ Examples Used as follows: - with opening_w_error("/etc/passwd", "a") as f, err: + with opening_w_error("/etc/passwd", "a") as (f, err): if err: print "IOError:", err else: