[Python-Dev] summary of transitioning from % to {} formatting (original) (raw)
Barry Warsaw barry at python.org
Mon Oct 5 23:01:15 CEST 2009
- Previous message: [Python-Dev] summary of transitioning from % to {} formatting
- Next message: [Python-Dev] summary of transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Oct 5, 2009, at 4:41 PM, Nick Coghlan wrote:
Oh, I see what you meant now - you were pointing out that lazy formatting APIs (such as logging) already don't work properly for alternative formatting mechanisms (such as string.Template).
Yep.
(Although printing to a String IO doesn't seem necessary - simply pre-formatting the message seems like it should work, just as preformatting brace formatted messages already works today).
Yep. :)
The idea of adding an optional "fmtstyle" callable to these APIs (defaulting to None, which would imply the use of the mod operator) is becoming more appealing...
-Barry
-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 832 bytes Desc: This is a digitally signed message part URL: <http://mail.python.org/pipermail/python-dev/attachments/20091005/7fbff8bb/attachment.pgp>
- Previous message: [Python-Dev] summary of transitioning from % to {} formatting
- Next message: [Python-Dev] summary of transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]