Andrew Svetlov <andrew.svet...@gmail.com> added the comment:
'catch (boost::python::error_already_set e)' is equal to `except BaseException as e:` In Python, blind catching base exception is dangerous, the code should re-raise it usually. The same is true for boost::python usage. > how would it tell the difference between a "real" exception raised from > within whatever function is currently returning and the "fake" StopIteration > exception that is in the error global while an async function returns? There is no "fake" exception. async function is a kind of Python generator object that uses StopIteration exception for finishing. The same is true for a regular Python iterator; nothing asyncio specific. I suggest writing a functional equivalent for `except Exception as e: print(e)` instead of catching BaseException error. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45033> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com