Bugs are caused by the programmer, regardless of the language. The best way of know of avoiding bugs in Python is a combination of running Pylint in the Pydev editor as I type (I'd assume other IDEs let you do this as well) and testing, more testing and yet more testing.