News for hackers. Stuff that matters.
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".
Re:What’s New in Python 3.8 by Will_Do on Monday October 14, 2019 @06:14PM (#21253445)
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
Re:What’s New in Python 3.8 by falcor84 on Monday October 14, 2019 @06:16PM (#21253461)
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.

Re:What’s New in Python 3.8 by eru on Tuesday October 15, 2019 @02:27AM (#21256015)
The clean way would be to introduce laziness. But yeah, can't do that in Python.