New submission from Hugo Dupras <[email protected]>:
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 <[email protected]>
<https://bugs.python.org/issue38640>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com