-
-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Labels
bugNot working as intendedNot working as intended
Description
I was looking at the relevant code for @Hato1's proposal in #3531 and I noticed that FRects and Rects have the same error message.
>>> import pygame
pygame-ce 2.5.5 (SDL 2.32.6, Python 3.12.3)
>>> r = pygame.Rect(10,20,30,40)
>>> fr = pygame.FRect(10,20,30,40)
>>>
>>> 10 in r
True
>>> 10.0 in r
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'in <pygame.rect.Rect>' requires rect style object or int as left operand
>>>
>>> 10 in fr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'in <pygame.rect.FRect>' requires rect style object or int as left operand
>>> 10.0 in fr
True
FRect requires a float as the left operand but the error message says it requires an int.
TypeError: 'in <pygame.rect.FRect>' requires rect style object or int as left operand
Metadata
Metadata
Assignees
Labels
bugNot working as intendedNot working as intended