Re: Please consider mentioning property without setter when an attribute can't be set

Feb. 13, 2022
1:03 p.m.
I think the more useful message would be something along the lines of AttributeError: can't set attribute 'f' on object of type 'D' This will help you track down the error. Steven D'Aprano listed three reasons why it might fail which sounds right but frequently the underlying reason is something else: You're trying to set the attribute on the wrong object (e.g., element.color vs. element.style.color). I wish more error messages identified the types of the objects involved. --- Bruce
1130
Age (days ago)
1130
Last active (days ago)
0 comments
1 participants
participants (1)
-
Bruce Leban