EuroPython 2018

Descriptors and Metaclasses - Understanding Python's More Advanced Features

Speaker(s) Mike Müller

Descriptors and metaclasses are advanced Python features. While it is possible to write Python programs without active knowledge of them, knowing more about them facilitates a deeper understanding of the language. With examples, you will learn how they work and how to write your own descriptors and metaclasses. Furthermore, you will understand when to use and when better not to use them.

This tutorial is a systematic introduction to descriptors and metaclasses. It covers all relevant information with a focus on practical applications for common tasks.

In hand-on sessions you will learn how to write your own descriptors that adapt attribute access to your needs. You will experience how metaclasses can help you to get more insight into a code base.

Use cases provide working code that can serve as a basis for your own solutions. You will gain a deeper understanding of more advanced concepts that can help to write better programs.

The training is designed for Python 3 (3.6+ preferred). Most of the material will work with Python 2.7, sometimes requiring minor modifications. I will use a Jupyter Notebook in [Jupyterlab] ( https://github.com/jupyterlab/jupyterlab) in the training. I encourage you to try them out. Otherwise any editor, IDE, or interactive Python environment your prefer works. No other 3rd party libraries to install. Please download the course material. I’ve been delivering these topics over the last years as a part of numerous advanced corporate trainings and open courses as well as trainings at PyCon US, EuroPython, PyCon PL, PyCon DE, and PyCon IE. The material has been continuously refined based on the feedback from participants.

in on Tuesday 24 July at 09:30 See schedule
in on Tuesday 24 July at 11:15 See schedule

Do you have some questions on this talk?

New comment