A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-June/054074.html below:

[Python-Dev] PEP 343 rewrite complete

[Python-Dev] PEP 343 rewrite completePhillip J. Eby pje at telecommunity.com
Thu Jun 2 22:24:46 CEST 2005
At 10:16 PM 6/2/2005 +0200, Eric Nieuwland wrote:

>On 2 jun 2005, at 22:12, Phillip J. Eby wrote:
>
> > At 10:04 PM 6/2/2005 +0200, Eric Nieuwland wrote:
> >> I was thinking about 'try EXPR [as VAR]:' as a 'try' that handles
> >> uncaught exceptions by forwarding it to EXPR's __exit__ method. No
> >> confusion with me.
> >
> > No doubt.  However, it's not obvious what happens to an exception in
> > EXPR; surely it can't be passed to EXPR's __exit__ method.  So, is it
> > handled by the try, or does it pass out of the block?  Whichever
> > answer you give, there is somebody who will think the opposite.  And
> > this is precisely the ambiguity I've been talking about.
> >
> > In contrast, a 'with' unmixed with 'try' is absolutely unambiguous as
> > to which except: clauses handle what exceptions where.
>
><slap forehead> I never thought of that! Now I see what you mean.
>I could only save my idea by stating "the scope of 'try' only starts
>after the ':'", but that seems too artificial.

That's what I mean: if you have to solve it by decree, it becomes a rule 
that people have to *remember* (or at least read carefully and think about 
it), which goes against the "executable pseudocode" nature.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4