Failing on string exceptions in 2.4

Stephen R Laniel steve at
Thu Jun 14 23:45:08 CEST 2007

Reading the Python docs, it looks like string exceptions
will be a DeprecationWarning in Python 2.5. Is there any way
to make them so in 2.4? Now how about if I want to turn all
DeprecationWarnings into compile-time errors? Is there some
way to do this?

End goal being that string exceptions would cause
compilation to fail. A few times now, I've found myself

class SomeClass:

raise SomeClass, "Some description"

and I've gotten a weird compiler error about the constructor
for SomeClass. I'd prefer it just to fail there and not let
me raise an exception that isn't subclassed beneath

Stephen R. Laniel
steve at
Cell: +(617) 308-5571
PGP key:

More information about the Python-list mailing list