0

So I decided I wanted to make my own custom event system thing and it all works except that on line 2 python is like:

Traceback (most recent call last):
  File "d:\CollidaCube\VSCode\GameAPY\event.py", line 1, in <module>
    class EventListener():
  File "d:\CollidaCube\VSCode\GameAPY\event.py", line 2, in EventListener
    def __init__(self, func: function):
NameError: name 'function' is not defined

why is this and how can i fix it? my code

1 Answers1

0

Seon has responded with a valid answer to my question. This has been answered here. In my case, I have decided to use type(abs). its simple and I understand it.

Edit: After some experimentation I discovered that my VSCode nor python will yell at me if I do type[abs].