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
>
>
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/LLYAMITF6K25I7YFUR7TYGX3DQVMSKHQ/
Code of Conduct: http://python.org/psf/codeofconduct/