Great talk! Thanks for sharing. Worth noting is PEP 487 that introduced a hook that calls ___set_name___ on all descriptors upon class creation, meaning descriptors now can have knowledge of the field names they are associated with.
I really like the way you model your explanations: and clearly define what level of abstractions you are dealing with. Quite clear, no space for ambiguities. I would lve to see a full OO course in Python from you.
I can relate. A year ago I wouldn't understand it, too. Just keep working on it, and everything will make sense. Read more books like "Powerful Python" or "Python Cookbook", and you will understand it.
some notes from the lectures in @23:49 Descriptors: A generic mechanism to create getters and setter that you can resuse. A descriptor encapulates attribute getting/setting logic in a reusable way. (what is a reusable way?) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-81S01c9zytE.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-81S01c9zytE.html - In order for a descriptor to do its magic, it needs to be a class attribute, not an instance attribute. AFAIK Properties implements the descriptor protocol, properties provides an interface to instance attributes (properties intercept access to attributes). The descriptor protocol is tied to scoping and has a execution precedence ("7 simple rules") Cant really connect more dots than this right now... What is a descriptor ? How do i use it? When do i use it? Why do i use it?
For people watching this now: PEP 487 (Python 3.6) introduced a __set_name__ hook on the descriptor which is called upon class creation. This makes it possible to store values in the instance `__dict__` with this name. See www.python.org/dev/peps/pep-0487/.
I do not understand the praise for this talk. Raymond Hettinger's excellent "Descriptor HOWTO" is clearer in all respects and more comprehensive to boot.