The getter method should always come before the setter and deletter. In python, the getter method is decorated only with @property, and has the name of the attribute it's setting. The setter and deleter use the attribute as part of the decorator (@[attribute].setter and @[attribute].deleter), therefore the getter must exist before they are declared.
Note the question is which one is false
The @property decorator:
* designates a method which will be called automatically when another object wants to read the encapsulated attribute value
* the name of the designated method will be used as the name of the instance attribute corresponding to the encapsulated attribute
* should be defined before the method responsible for setting the value of the encapsulated attribute, and before the method responsible for deleting the encapsulated attribute
A states it should be used AFTER the setter, so that's the wrong answer.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
rafles
9 months, 3 weeks agow_w_w_w_w_w
9 months, 3 weeks ago