Sep Dehpour - Magic Method, on the wall, who, now, is the `__fairest__` one of all?

Sep Dehpour - Magic Method, on the wall, who, now, is the `__fairest__` one of all?

Magic methods are a very powerful feature of Python and can open a whole new door for you. However, with great power comes great responsibility.

In this talk we explore magic method's capabilities by first designing new interfaces in a series of fun experiments. Secondly, we play with creating undeletable objects and learn about the mighty Garbage Collector in cPython and how a single magic method can overturn the fate of the object. Lastly, we create a lazy Redis client to illustrate a practical application of magic methods and learn about lazy loading.

Once you see what magic methods can bring to the table, the limit is only your imagination!

https://us.pycon.org/2017/schedule/presentation/486/

Bde70c0ba031a765ff25c19e6b7d6d23?s=128

PyCon 2017

May 21, 2017
Tweet