Brett Cannon <brett <at> python.org> writes: > As for the PercentMessage/BraceMessage, I would make sure that you > just simply take the string format and simply apply the arguments > later to cut down on the amount of parentheses butting up against each > other: ``logger.debug(BraceMessage("The {} is {}"), "answer", 42)``.
The problem with that is that BraceMessage.__str__() wouldn't know what arguments to use to produce the message. > cost of wrapping all strings for a while. I suspect most people will > simply import the wrapping class and give it some short name like > people do with gettext. > Yes, logger.debug(__("The {} is {}", "answer", 42)) isn't ideal but perhaps liveable with. And hopefully with a decent editor, the paren-butting annoyance will be minimized. Regards, Vinay Sajip _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com