But Python has more general metaprogramming capabilities. The secret to metaprogramming is treating code as just another kind of data. (The DRY principle applies to any kind of data, especially the ...
You can find documentation online here. For a quick start see Eric Niebler's blog post: A tiny metaprogramming library. (Note: the names in Meta are different from those describe in the blog post, but ...