Summary
Starting off with the meaning of metaprogramming we quickly dive into the different ways Python allows this.
First we talk about class and functions decorators, when decorators are not enough anymore we'll explore the wonders of metaclasses.
In the last part of the talk we'll talk about macros, first in Lisp and then using the amazing macropy library.
Description
This talk is a journey in the wonderful world of metaprogramming. We start off with the meaning of metaprogramming and what it can be used for.
Then we look at what can be done in Python, introducing function and class decorators. When decorators are not enough anymore we move to the black magic of metaclasses, showing how we can implemement a simple Django-like model with them.
In the bonus track we'll talk about macros, as the ultimate metaprogramming weapon, showing briefly how Lisp macros work and introducing the amazing macropy library.