Files
openide/python/testData/codeInsight/controlflow/assignmentexpressioninsidebinaryinwhileelse.py
Semyon Proshev ea9c2c9415 Reuse if-statements approach for while-statements to understand when and where condition is succeeded/failed (PY-39262)
It allows to assume that under `and` condition all sub-conditions are satisfied.

GitOrigin-RevId: f58ed2706d7eb9c1595415cce57cb8020011b57a
2021-03-23 11:45:13 +00:00

9 lines
155 B
Python

while undefined1 and (r := undefined2()):
print(r)
else:
print("ok")
while undefined3 or (r2 := undefined4()):
print(r2)
else:
print("ok")