[Python-ideas] Syntax for loop invariants

2020-03-17 Thread haael
Python has more and more optional tools for formal correctness cheking. Why not loop invariants? Loop invariant is such a statement that if it was true before the loop iteration, it will also be true after the iteration. It can be implemented as an assertion of an implication. now_va

[Python-ideas] Re: Syntax for loop invariants

2020-03-17 Thread Steve Jorgensen
haael wrote: > Python has more and more optional tools for formal correctness cheking. > Why not loop invariants? > Loop invariant is such a statement that if it was true before the loop > iteration, it will also be true after the iteration. It can be > implemented as an assertion of an implicat

[Python-ideas] Re: Syntax for loop invariants

2020-03-17 Thread Steven D'Aprano
On Tue, Mar 17, 2020 at 06:12:56PM +, haael wrote: > > Python has more and more optional tools for formal correctness cheking. Are you talking about third-party applications? > Why not loop invariants? Wrong question :-) Adding new language features to Python isn't "default allow", addin