[issue33424] 4.4. break and continue Statements, and else Clauses on Loops

2018-05-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: Joe, we have no idea what you think is the bug. It is intentional that the second argument for range is excluded. This is called an "half-open" range, and it helps avoid off-by-one and signpost errors. Your comments about break, continue and else don't seem

[issue33424] 4.4. break and continue Statements, and else Clauses on Loops

2018-05-03 Thread Tim Peters
Tim Peters added the comment: Closing because this appears to be senseless. -- nosy: +tim.peters resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue33424] 4.4. break and continue Statements, and else Clauses on Loops

2018-05-03 Thread CH
New submission from CH : range function second parameter is excluded. Hence for x in range(2, n): will not execute when n = 2, and "2 is a prime number" will never appear. Moreover, might need a break in the else block too. -- messages: 316158 nosy: joesatriani priority: normal severity