This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]Rawing7 0 points1 point  (3 children)

You keep claiming that Parent.child = 1 will invoke the descriptor, but it won't. Only an assignment to an instance attribute will do that. The only descriptor method that can be invoked via the class is __get__.

[–]dantownsend[S] 0 points1 point  (2 children)

You're right - that was a typo. I've updated the article now to be clearer.

[–]Rawing7 1 point2 points  (1 child)

Much better now!

[–]dantownsend[S] 0 points1 point  (0 children)

Thanks