> # idiom 3 (after my patch, or with a homegrown function) > x = template % dict(key1=foo(), key2=baz()) +1 This is much more readable, intuitive, and easy to type.