Message287803
Thanks to Matthias' PR the information is all there in the exception, but the message has not been changed. One idea for this -- depending on how much C code you want to write -- is to provide a default message for __str__() that changes depending on whether 'path' and/or 'name' are set. Then you can just set the attributes in the __init__() and have __str__() take care of providing a common message format. Another option is to do all of that in the __init__() so that BaseException.args continues to have the full error message (but that is added overhead if the __str__() is never taken of the exception). I also have no clue how much C code this would take :) (This is all why I have toyed with the idea of re-implementing the exceptions in Python for easier customization.) |
|
Date |
User |
Action |
Args |
2017-02-15 00:31:59 | brett.cannon | set | recipients:
+ brett.cannon, barry, mbussonn |
2017-02-15 00:31:59 | brett.cannon | set | messageid: <1487118719.83.0.244089204751.issue29546@psf.upfronthosting.co.za> |
2017-02-15 00:31:59 | brett.cannon | link | issue29546 messages |
2017-02-15 00:31:59 | brett.cannon | create | |
|