Possible Duplicate:
Tools for static type checking in Python
For most part I love the fact that you can pick up any type and drop it where you like in Python and just let the Duck typing take over. But how would one stop the darn thing from passing Compile time. Is there a way to enforce some sort of sanity checks when required at compile time, without resorting to Unit Tesing.
Use a separate tool like Pychecker to warn you about things like usages of non-existent methods or properties. This isn’t part of compilation, but you could enforce it as part of your own process, such as a pre-commit hook in your VCS.