Closed KotlinIsland closed 3 months ago
for _ in range(1): a = 1 print(a) # error: possibly undefined
x: int y: int for _ in range(x, y) or (1,): a = 1 print(a) # ah yes, it's defined
a once helper would be useful: it would assert that it runs at least once
once
x: int y: int for _ in once(range(x, y)): a = 1 print(a) # ah yes, it's defined
Although, this could be addressed at a fundamental level.
Duplicate of #348
actually no its not, thats related to literals which is probably easier to do than this
actually i changed my mind i think these should both be addressed as part of the same issue
Problem:
Solution:
a
once
helper would be useful: it would assert that it runs at least onceAlthough, this could be addressed at a fundamental level.