[issue6844] BaseException DeprecationError raises inappropriately
report at bugs.python.org
Mon Sep 7 22:01:49 CEST 2009
Jean-Paul Calderone <exarkun at divmod.com> added the comment:
Hm. That PEP is marked as rejected, though. I guess it was partially
implemented, those changes included in the Python 2.5 release, and then
it was decided that it was a bad idea, rejected, and the changes undone
for 3.x (what about 2.7)? Or did something else happen?
I did a simple search on the PEP for the word "message", but the word
doesn't appear anywhere in the text! So I guess it's a feature that's
implied by the PEP, but I would appreciate some help figuring out the
Here's what I do see:
- If one argument is passed to BaseException.__init__, then the value
is used as the value for the message attribute.
- If zero or more than one arguments are passed, then the attribute is
given the empty string for a value.
- If zero or one arguments are passed, the message attribute is used
as the string representation of the exception instance.
The deprecation warning emitted in 2.6 doesn't tell me which of these
things is deprecated, though. Is there something more to the message
attribute, or are one or more of the above list things which should no
longer be relied on?
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list