PEP 572: Add additional rationale from while loops

This commit is contained in:
Chris Angelico 2018-03-02 22:26:35 +11:00
parent 2f1b0d36fc
commit a81f68c35c
1 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,11 @@ are currently several ways to spell this, none of which is universally
accepted as ideal. A statement-local name allows any subexpression to be accepted as ideal. A statement-local name allows any subexpression to be
temporarily captured and then used multiple times. temporarily captured and then used multiple times.
Additionally, this syntax can in places be used to remove the need to write an
infinite loop with a ``break`` in it. Capturing part of a ``while`` loop's
condition can improve the clarity of the loop header while still making the
actual value available within the loop body.
Syntax and semantics Syntax and semantics
==================== ====================