Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

It is not related to loop.stop() and asyncio in general. It is the return 
statement which eats the exception. Simpler example:

>>> def f():
...     try:
...         1/0
...     finally:
...         return 42
... 
>>> f()
42

Return (and also break and continue) in the finally block cancel an exception 
if it was raised.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45894>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to