Am Fr., 11. Juni 2021 um 03:17 Uhr schrieb Stephan Hoyer <[email protected]>:
> On Thu, Jun 10, 2021 at 7:10 AM Chris Angelico <[email protected]> wrote: > >> This proposal is basically for a way to take an f-string-like >> construct and, instead of calling format() on each of the values and >> joining them together into a string, you do something else with it. Or >> from a language perspective, you package it all up and hand it to a >> custom function. >> >> So it's basically an f-string minus the final step - which is why PEP >> 501 described f-strings in terms of interpolated strings. >> > > Unevaluated f-strings is a nice way to think about this functionality. > > Another use-case that comes to mind is logging. The Google Python style > guide says not to use f-strings, for example, because it wants to be able > to collect the unexpanded pattern strings and not waste time rendering > unlogged messages: > https://google.github.io/styleguide/pyguide.html#3101-logging > Thank you Stephan for this feedback. I added Logging to the draft: https://github.com/guettli/peps/blob/master/pep-9999.rst#logging Regards, Thomas
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/SNVRBK645PHEVBPNZI4OULLWXP37C54P/ Code of Conduct: http://python.org/psf/codeofconduct/
