This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Martin Teichmann, Martin.Teichmann, Tim.Graham, eric.snow, ncoghlan, python-dev, serhiy.storchaka
Date 2016-10-09.06:31:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Shouldn't it be RuntimeError?

Proposed patch makes RuntimeError be raised with chained original exception. This preserves more information.

>>> class FaultyImplementation:
...     def __set_name__(self, *args):
...         1/0
>>> class TheoreticallyCouldWork:
...     attr = FaultyImplementation()
ZeroDivisionError: division by zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: Error calling __set_name__ on 'FaultyImplementation' instance 'attr' in 'TheoreticallyCouldWork'
Date User Action Args
2016-10-09 06:31:21serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, python-dev, eric.snow, Martin.Teichmann, Tim.Graham, Martin Teichmann
2016-10-09 06:31:21serhiy.storchakasetmessageid: <>
2016-10-09 06:31:21serhiy.storchakalinkissue28214 messages
2016-10-09 06:31:20serhiy.storchakacreate