[issue31989] setattr on a property gives a very unhelpful exception

2017-11-09 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of #27794. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> setattr a read-only property; the AttributeError should show the attribute that failed versions: +Python 3.8 -

[issue31989] setattr on a property gives a very unhelpful exception

2017-11-08 Thread Mark Diekhans
Mark Diekhans added the comment: The trackback is not helpful if the attribute name is in a variable. It also doesn't explain why the error occurred. While I would not rate this as a high priority, I don't see an argument for having uninformative error messages. Raymond Hettinger writes: >

[issue31989] setattr on a property gives a very unhelpful exception

2017-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Usually, all the necessary information is present in the previous line of the traceback: >>> a.volume = 10 Traceback (most recent call last): File "", line 1, in a.volume = 10 AttributeError: can't set attribute I don't seem to r

[issue31989] setattr on a property gives a very unhelpful exception

2017-11-08 Thread Mark Diekhans
New submission from Mark Diekhans : done a setattr on a property gives a very unhelpful error message AttributeError: can't set attribute it neither indicates the name of the attribute that failed or the cause. an error such as "can't set property attribute: the_attr_name" would be far mor