EventType.eq has the following implementation:
def __eq__(self, other):return self.__dict__ == other.__dict__
if other is None, this results in the following AttributeError:
File "src/pygame_sdl2/event.pyx", line 90, in pygame_sdl2.event.EventType.__eq__AttributeError: 'NoneType' object has no attribute '__dict__'
This precludes checks like event == other when other can at any point be None.
When using ren'py 8.1.3, this can be reproduced by using SetScreenVariable to set a screen variable defaulting to None to a pygame_sdl2 EventType object; get_selected() attempts to perform the above equality check (more specifically, cs.scope[self.name] == self.value) and results in this AttributeError.
EventType.eq has the following implementation:
def __eq__(self, other):
return self.__dict__ == other.__dict__
if other is None, this results in the following AttributeError:
File "src/pygame_sdl2/event.pyx", line 90, in pygame_sdl2.event.EventType.__eq__
AttributeError: 'NoneType' object has no attribute '__dict__'
This precludes checks like
event == other
when other can at any point be None.When using ren'py 8.1.3, this can be reproduced by using SetScreenVariable to set a screen variable defaulting to None to a pygame_sdl2 EventType object; get_selected() attempts to perform the above equality check (more specifically,
cs.scope[self.name] == self.value
) and results in this AttributeError.