[Python-ideas] Block-Scoped Exception Handlers

Kyle Lahnakoski klahnakoski at mozilla.com
Wed May 4 19:29:37 EDT 2016


To mitigate my indentation disaster, I posted the document on Github.

https://github.com/klahnakoski/Block-Scoped-Exception-Handlers


On 5/4/2016 6:45 PM, Robert van Geel wrote:
> How can you indicate the 'exception handled block' should end, when
> there's no indentation level involved? It would force the exception
> block to service all code until the end of that indentation level but
> what happens on within the indentation level is defined by other more
> functional criteria. The proposed construct could not replace the
> normal try/catch syntax because of that, but it can also not mix with
> the normal syntax well because it's too similar to it and hence
> confusing.
>



More information about the Python-ideas mailing list