Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, your example is just not an error in Python. It might be a bug, it not be what you meant to do, but it is not an error in a dynamically typed language like Python. It is valid, legal code.

My point was just that although Python is dynamically typed, it is still a compiled-to-bytecode language (much as Java is) and you don't have to discover your errors at runtime, that is optional. You have the ability to perform just the compile step without executing the bytecode. The 'compileall' command does that.

There are also great tools like pylint for static source code checking. And of course unit testing is always key.

But of course, if you are looking to catch typing and variable declaration bugs at compile time, you need to be using a statically typed language.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: