[Python-Dev] PEP for allowing 'raise NewException from None' (original) (raw)
Guido van Rossum guido at python.org
Fri Jan 27 06:51:35 CET 2012
- Previous message: [Python-Dev] PEP for allowing 'raise NewException from None'
- Next message: [Python-Dev] PEP for allowing 'raise NewException from None'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jan 26, 2012 at 9:18 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
I've been burnt by too much code that replaces detailed, informative and useful error messages that tell me exactly what is going wrong with bland, useless garbage to be in favour of an approach that doesn't even set the context attribute in the first place.
Ditto here.
If context is always set regardless, and then cause is used to control whether or not context gets displayed in the standard tracebacks, that's a much more flexible approach.
Well, but usually all you see is the printed traceback, so it might as well be lost, right? (It gives full control to programmatic handlers, of course, but that's usually not where the problem lies. It's when things go horribly wrong in the hash function and all you see in the traceback is a lousy KeyError. :-) Did you consider to just change the words so users can ignore it more easily?
-- --Guido van Rossum (python.org/~guido)
- Previous message: [Python-Dev] PEP for allowing 'raise NewException from None'
- Next message: [Python-Dev] PEP for allowing 'raise NewException from None'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]