String Exceptions (PEP 352)

Thomas Guettler niemand.leermann at thomas-guettler.de
Thu Apr 27 10:18:41 EDT 2006


Hi,

I like python because it is compatible to old versions. That's way I think
string exceptions should not be deprecated.

I use string exceptions if the condition for an assertion is
to complex:

if foo and bar and i>10:
    raise "if foo and bar i must not be greater than 10"

This way I can easily add "checkpoints" to my code.

Is it too late to change this? Way not make this line

    raise "..."

behave like this:

    raise Exception("...")   

in the future?

I know that catching string exceptions and reading the
string is different from Exception("..."). This could
become deprecated.

Please keep Python compatible to old versions.

 Thomas Güttler

-- 
Thomas Güttler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Spam Catcher: niemand.leermann at thomas-guettler.de




More information about the Python-list mailing list