[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Syntax changes need PEPs. By default, syntax changes are rejected. This is especially true for new keywords, as any acceptible word will already be in use, and hence its introduction *will* break code. We are still having issues over having temporarily

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-22 Thread WloHu
WloHu added the comment: Sorry for beeing ignorant about python-ideas. The linked proposal is almost exatly what I've requested here, the differences are that it discusses other keyword alternatives and mine suggests an alternative for making empty generators false. If lack of follow-up in

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Slightly similar proposal in the past : https://mail.python.org/pipermail/python-ideas/2016-March/038897.html -- ___ Python tracker

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: This issue should be discussed on python-ideas https://mail.python.org/mailman/listinfo/python-ideas -- nosy: +matrixise ___ Python tracker

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: yep and there was no followup. maybe we could close this issue. -- ___ Python tracker ___ ___

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I would recommend posting this on python-ideas to get some feedback. This introduces new control flow and breaks some old assumptions as in third case empty block is executed and there might be code that depends upon current for-else behavior

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread WloHu
New submission from WloHu : ### Description Adding `empty` block to loops will extend them to form for-empty-else and while-empty-else. The idea is that `empty` block will execute when loop iteration wasn't performed because iterated element was empty. The idea is taken from Django