Author serhiy.storchaka
Recipients Martin Teichmann, Martin.Teichmann, Tim.Graham, eric.snow, ncoghlan, python-dev, serhiy.storchaka
Date 2016-10-09.06:41:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475995292.43.0.747440096426.issue28214@psf.upfronthosting.co.za>
In-reply-to
Content
Alternative patch chain original exception as __cause__ instead of __context__. What is better?

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

The above exception was the direct cause of the following exception:

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