Live data from Hacker News

Simple type checked objects in Python

gist.github.com

1–4 of 4 posts

Re: Simple type checked objects in Python

#2
That's not what "static typed" means.

Static, referring to types, means at compile time, or before runtime, the types of variables and assignments can be verified; no invalid assignments are possible.

What you have here is dynamic typing; you can't verify the types until runtime, and then you throw an exception.

https://en.wikipedia.org/wiki/Type_system#DYNAMIC

Re: Simple type checked objects in Python

#3
post #2

That's not what "static typed" means. Static, referring to types, means at compile time, or before runtime, the types of variables and assignments can be verified; no invalid assignments are possible. What you have here is dynamic typing; you can't verify the types until runtime, and then you throw an exception. https://en.wikipedia.org/wiki/Type_system#DYNAMIC

Fair point. I am editing the entry name to reflect your suggestions. Static typed -> type checked at runtime

Re: Simple type checked objects in Python

#4
post #2

That's not what "static typed" means. Static, referring to types, means at compile time, or before runtime, the types of variables and assignments can be verified; no invalid assignments are possible. What you have here is dynamic typing; you can't verify the types until runtime, and then you throw an exception. https://en.wikipedia.org/wiki/Type_system#DYNAMIC

Fair point. I am editing the entry name to reflect your suggestions. Static typed -> type checked at runtime

LGTM