A bunch of small hacks that might be useful in Python programs.