Amazing Python Hack


I don't normally post naked links here but this recipe in the ASPN Python Cookbook has to go down as the best Python hack I've seen.

Be sure to read the discussion too.