Author ncoghlan
Recipients Martin Teichmann, Martin.Teichmann, Tim.Graham, ncoghlan
Date 2016-09-20.15:51:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474386701.35.0.943526914025.issue28214@psf.upfronthosting.co.za>
In-reply-to
Content
The information we want to include in the chained exception:

1. The name of the offending attribute (since the traceback will point to the class header, not to the assignment)
2. The repr of the offending attribute (since the innner exception will refer to the return value from "attr.__set_name__" rather then the value assigned to the attribute)

The other idea I mentioned (allowing "__set_name__ = None" to prevent falling back to "__getattr__") needs a bit more consideration, as I don't quite recall where we're currently at in terms of expanding that idiom beyond "__hash__" and to the other one-shot ABCs.
History
Date User Action Args
2016-09-20 15:51:41ncoghlansetrecipients: + ncoghlan, Martin.Teichmann, Tim.Graham, Martin Teichmann
2016-09-20 15:51:41ncoghlansetmessageid: <1474386701.35.0.943526914025.issue28214@psf.upfronthosting.co.za>
2016-09-20 15:51:41ncoghlanlinkissue28214 messages
2016-09-20 15:51:41ncoghlancreate