PEP 572: Clarify the problems with 'as'

This commit is contained in:
Chris Angelico 2018-04-13 21:59:40 +10:00
parent 5c2778d403
commit ed718f5186
1 changed files with 3 additions and 1 deletions

View File

@ -293,7 +293,9 @@ Broadly the same semantics as the current proposal, but spelled differently.
With the parentheses, this becomes a viable option, with its own tradeoffs
in syntactic ambiguity. Since ``EXPR as NAME`` already has meaning in
``except`` and ``with`` statements (with different semantics), this would
create unnecessary confusion or require special-casing.
create unnecessary confusion or require special-casing (most notably of
``with`` and ``except`` statements, where a nearly-identical syntax has
different semantics).
2. Adorning statement-local names with a leading dot::