Re:What’s New in Python 3.8
by heavenlyblue on Monday October 14, 2019 @06:10PM
(#21253414)
One thing I vastly dislike with them is that they are still expanded in logging, while they are not expanded when logging is using "the old way".
[ Parent
| on HN ]
What do you mean the old way?
Will it print what foo is if I type logger.info("{foo=}")?
Re:What’s New in Python 3.8
by zaphirplane on Monday October 14, 2019 @06:34PM
(#21253586)
Logging.info(“%s %s”, name, country”) the string isn’t expanded if the logging is set to warn. While with your example the string is expanded then discarded
How would you fix the issue without breaking existing semantics?
The way I see it, it's a necessary price to pay, and I just continue to use c-style forming strings in logging.