<skip <at> pobox.com> writes:
> >>> logging.error("error 1 2 3 %s" % "yup")
> ERROR:root:error 1 2 3 yup
> >>> logging.error("error 1 2 3 %s", "yup")
> ERROR:root:error 1 2 3 yup
>
> The second form should be preferred in library code as long as the format
> string expansion is deferred until after the test is made to emit the
> message.
Yes, and the string expansion normally is deferred to happen as late as
possible.
Regards,
Vinay
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com