I came across an interesting post Metaprogramming: Ruby vs. Javascript, which discusses and contrasts about how metaprogramming can be implemented in Ruby and Javascript. I thought it might be fun to document the same from a python perspective as well. Here are the discussed samples. All the ruby code is quoted from from the blog post linked to above whereas the python code is what I wrote. 1. Ini