Jan-09-2024, 07:09 AM
(Jan-09-2024, 07:00 AM)akbarza Wrote: in the above code, by removing line 18, the code works again.If you remove line 18, there is no descriptor any more and
__get__
or __set__
are not called. Python creates an ordinary attribute age
in the dictionary of the Person
instance.
« We can solve any problem by introducing an extra level of indirection »