Is there a way to to detect an infinite range ?
Closed this issue · 0 comments
ewjoachim commented
A bit similar to #1, but a different question, so I'm opening a distinct issue :)
I'm seeing no other way to detect that a range is infinite than checking the type of range.end. Is it by design ?
if isisntance(Range(start=2).end, int):
print("finite range")
else:
print("infinite range")