[Python-Dev] PEP 348 (exception reorg) revised again

Guido van Rossum gvanrossum at gmail.com
Mon Aug 15 19:08:02 CEST 2005


I'm with Raymond here.

On 8/15/05, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
> [Brett]
> > This obviously goes against what Guido last said he
> > wanted, but I hope I can convince him to get rid of bare 'except's.
> 
> -1 on eliminating bare excepts.  This unnecessarily breaks tons of code
> without offering ANY compensating benefits.  There are valid use cases
> for this construct.  It is completely Pythonic to have bare keywords
> apply a useful default as an aid to readability and ease of coding.
> 
> +1 on the new BaseException
> 
> +1 on moving NotImplementedError, SystemExit, and KeyboardInterrupt.
> 
> -1 on replacing "except (KeyboardInterrupt, SystemExit)" with "except
> TerminatingException".  1) Grepping existing code bases shows that these
> two are almost never caught together so it is a bit silly to introduce a
> second way to do it.  2) Efforts to keep the builtin namespace compact
> argue against adding a new builtin that will almost never be used.  3)
> The change unnecessarily sacrifices flatness, making the language more
> difficult to learn.  4) The "self-documenting" rationale is weak -- if
> needed, a two-word comment would suffice.  Existing code almost never
> has had to comment on catching multiple exceptions -- the exception
> tuple itself has been sufficiently obvious and explicit.  This rationale
> assumes that code readers aren't smart enough to infer that SystemExit
> has something to do with termination.
> 
> 
> 
> Raymond
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
> 


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list