PEP 572: Add additional rationale from while loops
This commit is contained in:
parent
2f1b0d36fc
commit
a81f68c35c
|
@ -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
|
||||
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
|
||||
====================
|
||||
|
|
Loading…
Reference in New Issue