[issue31989] setattr on a property gives a very unhelpful exception
Mark Diekhans
report at bugs.python.org
Wed Nov 8 23:56:24 EST 2017
Mark Diekhans <markd at kermodei.com> 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 <report at bugs.python.org> writes:
>
> Raymond Hettinger <raymond.hettinger at gmail.com> 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 "<pyshell#6>", line 1, in <module>
> a.volume = 10
> AttributeError: can't set attribute
>
> I don't seem to recall anyone else having problems with this error message.
>
> ----------
> nosy: +rhettinger
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue31989>
> _______________________________________
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31989>
_______________________________________
More information about the Python-bugs-list
mailing list