[Baypiggies] Python way to avoid usage of raise

DeLuca, Todd Todd_DeLuca at hms.harvard.edu
Thu Oct 7 02:34:54 CEST 2010


You could raise some exceptions without the word 'raise'.

>>> 'a' + 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'int' objects


Todd DeLuca


More information about the Baypiggies mailing list