[issue33576] Remove exception wrapping from __set_name__ calls

Serhiy Storchaka report at bugs.python.org
Sat May 19 10:54:14 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Unconditional replacing an exception is bad, because it can hide important exceptions like KeybordInterrupt or MemoryError.

What if raise a new exception only if TypeError was raised? This will cover the case of a __set_name__() method with wrong signature.

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

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33576>
_______________________________________


More information about the Python-bugs-list mailing list