[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Eric V. Smith
Eric V. Smith added the comment: Vinay raises a good point about performance that's well worth being aware of, especially with expensive objects (as he says). But since f-strings are much faster than other formatting (and especially .format()), there's a tradeoff. If I have something that I

[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Vinay Sajip
Vinay Sajip added the comment: It's as Eric said. So I'll close this issue as "not a bug". An additional point - by using f-strings, you may be doing unnecessary string formatting - e.g. if the event doesn't actually get handled because of logger or handler level or filter settings. It's wor

[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Eric V. Smith
Eric V. Smith added the comment: Since an f-string just evaluates to a regular string at the call site, before any logging code is invoked, there's nothing for the logging code to do. As far as it's concerned, it just gets a regular string. -- nosy: +eric.smith _

[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Shubham Singh
New submission from Shubham Singh : There is no method to implement format strings in the basicConfig() method of the logging module. There are the implementations of '%', '{' or '$' for printf-style, str.format() or string.Template respectively using the style keyword. -- messages: