python 2.5 2.6 safe exception syntax