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/2018-June/153807.html below:

[Python-Dev] Why not using "except: (...) raise" to cleanup on error?

[Python-Dev] Why not using "except: (...) raise" to cleanup on error? [Python-Dev] Why not using "except: (...) raise" to cleanup on error?Victor Stinner vstinner at redhat.com
Mon Jun 4 15:36:02 EDT 2018
2018-06-04 18:45 GMT+02:00 Guido van Rossum <guido at python.org>:
> It is currently a general convention in asyncio to only catch Exception, not
> BaseException. I consider this a flaw and we should fix it, but it's
> unfortunately not so easy -- the tests will fail if you replace all
> occurrences of Exception with BaseException, and it is not always clear
> what's the right thing to do. E.g. catching KeyboardInterrupt may actually
> make it harder to stop a runaway asyncio app.

I recall vaguely something about loop.run_until_complete() which
didn't behave "as expected" when interrupted by CTRL+c, like the
following call to loop.run_until_complete() didn't work as expected.
But this issue has been sorted out, no?

I mean that maybe asyncio uses "except Exception:" for "historical reasons"?

Victor
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