Antoine Pitrou wrote:
Vinay Sajip <vinay_sajip <at> yahoo.co.uk> writes:
Does it seems too onerous to expect people to pass an additional "use_format"
keyword argument with every logging call to indicate how to interpret the
message format string? Or does the PercentMessage/BraceMessage type approach
have any mileage? What do y'all think?

What about the proposal I made earlier?
(support for giving a callable, so that you pass the "{foobar}".format method
when you want new-style formatting)

As someone who likes .format() and who already uses such bound methods to print, such as in

emsg = "...".format
...
   if c: print(emsg(arg, barg))

I find this **MUCH** preferable to the ugly and seemingly unnecessary wrapper class idea being bandied about. This would be scarcely worse than passing the string itself.

Terry Jan Reedy

_______________________________________________
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

Reply via email to