`sim.py` Checking isinstance of function, error checking a function
Closed this issue · 1 comments
khan-asfi-reza commented
In sim.py
Line:507
checking if func
is function, will cause error as there is no valid keyword saved as function
in python.
A valid solution would be
if callable(func):
engineerjoe440 commented
This is an excellent example of where this project started from, and how it still has plenty of room to grow!
I agree, this is an item that really should be updated.
Long ago, in a University lab-room far, far away, I wrote this without knowing very much about the functions that Python had to support this sort of operation. In fact, it originally used a test like:
if str(type(func)) == "<type function>":
Looking back is "fun" but it also makes me cringe. We should fix this ASAP!