While creating a custom Exception class, I encountered an unexpected situation how the base Exception class handles parameters. Specifically, with how it sets the 'message' attribute.
When you pass more than one parameter to the Exception.__init__(), it does not initialize the message attribute. For example, this works
>>> e = Exception('msg')
>>> e.message
'msg'
BUT This does NOT set the message attribute
>>> e = Exception('msg', 'extra')
>>> e.message
''
It does of course store all the parameters in the args attribute:
>>> e = Exception('msg', 'extra')
>>> e.args
('msg', 'extra')
Can anyone shed light on this? I've scoured the Exception docs, but I'm at a loss to understand why the Exception class does this. In case it matters, this is python 2.7