30 Sep
2009
30 Sep
'09
9:50 a.m.
Although I hate the name 'dicttemplate', this seems like the best solution to me. Maybe it's good that 'dicttemplate' is so ugly though so that people will naturally prefer 'format' :). But I like this because there's not really any magic, it's explicit, and the decision is made by the coder at the call site. The implementation does not need to guess at all.
Unfortunately, as Steven pointed out, the parameter is *already* documented with the name "fmt". So one option would be to call it "fmt" and "format"; the other option would be to not only deprecate the positional passing, but also the passing under the name fmt=. As for calling it "dicttemplate" - I'm sure people can and will propose alternative spellings :-) Regards, Martin