Jan-08-2024, 10:29 PM
(This post was last modified: Jan-08-2024, 10:29 PM by Gribouillis.)
(Jan-08-2024, 07:35 AM)akbarza Wrote: any more opinion?I think the documentation is clear enough: Python knows how to call
__get__
for example because when you write an attribute access such as spam.eggs
, it looks in the dictionary of the class of the object spam
and if it finds a member named eggs
and this member has a __get__()
method then it calls the __get__()
method.
« We can solve any problem by introducing an extra level of indirection »