What error occurs when assigning to a property that has no setter in Python?
Correct answer
D. AttributeError
6 views
D. AttributeError
6 views
A read-only property raises AttributeError on assignment.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is D? Ask here and get an explanation.