Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Batuhan, unfortunately your second solution does not work too, because continue 
and break can be conditional. For example:

def simple(x):
    for number in range(2):
        try:
            return number
        finally:
            if x:
                continue

print(simple(0))
print(simple(1))

It should print:

0
None


Ethan, your understanding is correct.

----------
keywords: +3.8regression -patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37830>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to