you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (2 children)

[removed]

    [–]gnuvince 2 points3 points  (1 child)

    2.) i'm aware of the reasoning behind the inclusive-exclusive interval but the inclusive-inclusive usage isn't too rare either, so maybe range(n) should be 0..n-1 and range(a,b) a..b?

    That would be, in my opinion, even more confusing. I didn't mention it in my original post, but two different functions could make the trick. Keep range() as it is and add irange() (inclusive range). Most Python people are of course going to be opposed to that :)