I am once again asking for for-else loops.
has_ts = False
for file in files:
if file.endswith(".d.ts"):
has_ts = True
break
if not has_ts:
# TODO
pass
Whereas this can be much more succient.
for file in files:
if file.endswith(".d.ts")
break
else:
# TODO
pass
Coming from Python, it was surprising to see this loop construct unsupported. AFAIK there is no reason (e.g. Turing completeness, semantics incompatibility) to not support for-else.
I am once again asking for for-else loops.
Whereas this can be much more succient.
Coming from Python, it was surprising to see this loop construct unsupported. AFAIK there is no reason (e.g. Turing completeness, semantics incompatibility) to not support for-else.