from __magic__ import wtf

A session at PyCon Finland 2011

  • Tommie Gannert

Monday 17th October, 2011

10:00am to 10:45am (HMT)

Just because you can doesn't mean you should. Python provides facilities like __metaclass__, __getattr__, __call__, and others which allow programmers to do a lot of clever stuff. This magical code is fun to write, concise, and can be quite elegant. However, too much magic is dangerous, particularly in library code. You may think your code is clever and fun, but your colleague trying to maintain it or re-use it in another project later will probably be confused and annoyed by much thought is needed to understand what the heck your fancy code is doing. We will discuss finding the balance between fun magic and boring but clear with some examples of questionable magic we've encountered in Spotify's Python corpus.

About the speaker

This person is speaking at this event.
Tommie Gannert

Coverage of this session

Sign in to add slides, notes or videos to this session

PyCon Finland 2011

Finland Finland, Turku

17th18th October 2011

Tell your friends!


Time 10:00am10:45am HMT

Date Mon 17th October 2011

Short URL


Official event site


View the schedule



See something wrong?

Report an issue with this session