Descriptors are not black magic and this practical tutorial will show you that. In fact, you use descriptors every day and you don't even know it!
Through a series of practical, hands-on exercises, you will learn
__get__, __set__, and __set_name__;The expected Python level for participants is “intermediate”. In practice, if you are comfortable with using the built-in property and if you have used dunder methods before, you should be fine.
This tutorial is based off of an article I wrote about descriptors.
All materials can be accessed from this GH repo.
This impromptu tutorial gave a practical introduction to descriptors.
It had not been scheduled in advance. The day before, I noticed there was an empty slot in the schedule; after talking to the organisers, we concluded it was OK for me to use that slot, so I whipped up a short, practical tutorial for descriptors.
A participant, Sofia, wrote:
"Fantastic workshop about descriptors! I came out of it having learnt a lot about what goes on in the background. Really loved the friendly approach and the practical exercises with solutions so that everyone can follow."