That's poor compared to just logging.warning('Unusual situation', foo, bar).
I.e. since print isn't a statement, you can give other functions the same argument conventions that it has, instead of making the programmer use a string-generating shim.
Speaking of Common Lisp, it has functions other than format which take format arguments.
$ clisp -q
[1]> (error "value of ~s should be less than ~s" 'bloop 42)
*** - value of BLOOP should be less than 42
The following restarts are available:
I don't expect logging.warning to change in future versions of Python (currently it substitutes extra args as % operator, so you'd have to write logging.warning('Unusual situation foo=%s, bar=%s', foo, bar)) since it would unnecessarily break too much code. But since print doesn't return any usable value, it can be easily updated to return a useful value.
I.e. since print isn't a statement, you can give other functions the same argument conventions that it has, instead of making the programmer use a string-generating shim.
Speaking of Common Lisp, it has functions other than format which take format arguments.