Message349578
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. |
|
Date |
User |
Action |
Args |
2019-08-13 16:09:46 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, eric.smith, ethan.furman, lukasz.langa, Mark.Shannon, ppperry, pablogsal, xtreak, BTaskaya |
2019-08-13 16:09:46 | serhiy.storchaka | set | messageid: <1565712586.33.0.412989984265.issue37830@roundup.psfhosted.org> |
2019-08-13 16:09:46 | serhiy.storchaka | link | issue37830 messages |
2019-08-13 16:09:46 | serhiy.storchaka | create | |
|