Good point.  One question: in the second format spot, why do you have !r, not just {1}.  I'm not sure why a dict key would need any special formatting.