-
Notifications
You must be signed in to change notification settings - Fork 43
Description
The rich compare for sfml Vector2 is broken.
import sfml
a = sfml.system.Vector2(10, 10)
b = sfml.system.Vector2(10, 10)
a == b
a > b
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "src/sfml/system/system.pyx", line 124, in sfml.system.Vector2.__richcmp__
TypeError: raise: exception class must be a subclass of BaseException
I traced the problem to 'src/sfml/system/system.pyx' line 124:
raise NotImplemented
NotImplemented is not supposed to be raised. I propose to either do:
return NotImplemented
or maybe raise an error like this one:
abs(sfml.system.Vector2(1, 2))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: bad operand type for abs(): 'sfml.system.Vector2'
I can implement the solution if needed.