Release 2.0.0
This introduces backwards-incompatible changes to the API, and adds one new function.
In recognition that modern Python code more often uses f-strings, the function logr
is now named log
, and what was previously log
is now called logf
. Users who called the log
function with single strings will not notice any difference; users who called it with more than one argument (a string and format arguments) will get an error; and users who called logr
will also get an error, about an undefined function. The new set of log functions is more logically organized:
log
takes a single argument, a string. It does not applyformat
to the string.loglist
is likelog
, except it accepts multiple strings. It prints them one line at time.logf
takes a single string as the first argument and optionally multiple arguments after that. It passes the optional arguments toformat
.
An advantage of the new scheme is that it is more obvious when a message string will be passed to format
. Previously, if a string contained a character that had special meaning to format
(particularly {
) was passed to log
, it would result in an unexpected error. Now, the requirement to use the variant logf
hopefully makes it more obvious that the arguments are being treated specially.