471,336 Members | 1,239 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

Failing on string exceptions in 2.4

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
doing

class SomeClass:
"""docstring"""
pass

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
Exception.

--
Stephen R. Laniel
st***@laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
Jun 14 '07 #1
0 754

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by al | last post: by
1 post views Thread by Frank Rizzo | last post: by
18 posts views Thread by Scott David Daniels | last post: by
20 posts views Thread by cscorley | last post: by
3 posts views Thread by RvGrah | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.