[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread miss-islington


miss-islington  added the comment:


New changeset dcb338ea1b8f14e21dde3564658b9040df996349 by Miss Skeleton (bot) 
in branch '3.8':
bpo-38640: Allow break and continue in always false while loops (GH-16992)
https://github.com/python/cpython/commit/dcb338ea1b8f14e21dde3564658b9040df996349


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks, Hugo Dupras for the report! :)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16519
pull_request: https://github.com/python/cpython/pull/16993

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 6c3e66a34b95fff07df0ad5086104dd637a091ce by Pablo Galindo in 
branch 'master':
bpo-38640: Allow break and continue in always false while loops (GH-16992)
https://github.com/python/cpython/commit/6c3e66a34b95fff07df0ad5086104dd637a091ce


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +16518
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16992

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +3.8regression
nosy: +pablogsal, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Hugo Dupras


New submission from Hugo Dupras :

In python 3.8 the following code raises an exception, which was not the case 
with previous python.

```
while False:
...
break
```
It raises the following exception: SyntaxError: 'break' outside loop.
This `while False` loop was used to temporary disable a while loop in our code 
base.

Workaround to fix this:
```
enable=False
while enable:
...
break
``` (or use the walrus operator)

--
components: Interpreter Core
messages: 355700
nosy: jabesq
priority: normal
severity: normal
status: open
title: while False: break => SyntaxError: 'break' outside loop
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com