Question about type checking

Hello!

I’ve decided I would learn about type checking but I am confused because I don’t really understand the point of it as it isn’t erroring my script or anything?

I do get this warning but when ran, it isn’t producing any errors, which confuses me because if it isn’t supposed to error, what’s the point of it? Is it just something for the programmer to see just to ensure they aren’t skipping over anything?
Screen Shot 2021-08-02 at 10.04.57 PM

Screen Shot 2021-08-02 at 10.06.19 PM

If I have to manually do assert(type(s) == 'string', 'Expected string!') to cause it to error, doesn’t that kinda defeat the purpose of it?

1 Like

Pretty much, yes. That can be pretty valuable for complicated projects.

1 Like