On Mon, Apr 9, 2012 at 3:29 AM, Dave Angel <d...@davea.name> wrote: > I don't know about pygame, but almost everywhere in the standard > library, ranges are closed at the begin and open at the end. For > example, if you have range(30, 50), there are 20 items, numbered 30 > through 49. I expect the same will be true for rect.right() and > rect.bottom().
Your expectation is correct. I'll just point out the part in the Pygame docs that spells this out. http://www.pygame.org/docs/ref/rect.html "The area covered by a Rect does not include the right- and bottom-most edge of pixels. If one Rect's bottom border is another Rect's top border (i.e., rect1.bottom=rect2.top), the two meet exactly on the screen but do not overlap, and rect1.colliderect(rect2) returns false." Pekka -- http://mail.python.org/mailman/listinfo/python-list