Nice! One of the most tasteful uses of the inspect module I've seen ;)