kotlin-python icon indicating copy to clipboard operation
kotlin-python copied to clipboard

Support multiple comparisons: `0 <= limit < count` instead of `0 <= limit and limit < count`

Open krzema12 opened this issue 3 years ago • 2 comments

Originally created by @SerVB.

krzema12 avatar Nov 22 '21 09:11 krzema12

Why is it needed? Just to generate prettier Python? I'm also not sure if there's a Kotlin counterpart so that we can translate it 1:1 to Python.

krzema12 avatar Nov 22 '21 09:11 krzema12

Yep, it's just Pythonification.

When we have x in 0..1 or 0 <= x && x <= 1 in Kotlin, we now have 0 <= x and x <= 1 in the best case (or even something uglier as described in #54).

This issue is about that it would be cool to have just Python-ish 0 <= x <= 1 here.

SerVB avatar Nov 26 '21 10:11 SerVB