Skip to content

patch_set_timer breaks if you pass an pygame.event.Event #2

@queueseven

Description

@queueseven

In this line the constructor to pygame.event.Event is called with event, but event itself could already be a pygame.event.Event .

If that's the case, then the constructor of pygame.event.Event will throw a TypeError:

future: <Task finished name='main' coro=<main() done, defined at <console>:4> exception=TypeError("'pygame.event.Event' object cannot be interpreted as an integer")>
Traceback (most recent call last):
  File "<console>", line 19, in main
  File "/data/data/org.python/assets/site-packages/platform_wasm/pygame/__init__.py", line 40, in patch_set_timer
    cevent = pygame.event.Event(cust_event_no)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'pygame.event.Event' object cannot be interpreted as an integer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions