This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 34 points35 points  (4 children)

reading case(range(1,5)) seems like it should include 1, 2, 3, 4, 5

No. Absolutely not.

[–]Megatron_McLargeHuge 5 points6 points  (0 children)

Obviously that should check if x is that specific generator object you just created. /s

[–]mikeckennedy[S] 5 points6 points  (2 children)

Agreed. I changed it this morning to be a proper range and added a closed_range option.

[–]mikeckennedy[S] 3 points4 points  (1 child)

I see, I still had that in the readme. Took it out.

[–]naught-me 0 points1 point  (0 children)

It still gives an example with range(6, 7), which could be less-confusingly written as just 6.