[Python-Dev] transitioning from % to {} formatting (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Wed Sep 30 18:50:25 CEST 2009
- Previous message: [Python-Dev] transitioning from % to {} formatting
- Next message: [Python-Dev] transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] transitioning from % to {} formatting
- Next message: [Python-Dev] transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]