Playing around with python metaprogramming