A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-August/102608.html below:

[Python-Dev] Exception chaining and generator finalisation

[Python-Dev] Exception chaining and generator finalisation [Python-Dev] Exception chaining and generator finalisationGreg Ewing greg.ewing at canterbury.ac.nz
Sun Aug 1 05:25:43 CEST 2010
Nick Coghlan wrote:

> I don't see it as an implementation detail - it's part of the spec of
> generator finalisation in PEP 342

It doesn't seem like something you need to know in this
situation, though. All it tells you is that the finalisation
is happening because the generator is being closed rather
than completing on its own.

I suppose it doesn't do any harm, but it seems untidy to
clutter up the traceback with irrelevant and possibly
confusing information.

> Hit Ctrl-C nowTraceback (most recent call last):
>   File "<stdin>", line 2, in <module>
> KeyboardInterrupt
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 4, in <module>
> RuntimeError: Ooops

That's a bit different, because the fact that the program
was terminated by Ctrl-C could be useful information.

-- 
Greg
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