classification
Title: f-string should be the default placeholder
Type: Stage: resolved
Components: Library (Lib) Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: akash0x53, xtreak
Priority: normal Keywords: patch

Created on 2019-03-09 07:10 by akash0x53, last changed 2019-03-09 07:31 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12248 closed akash0x53, 2019-03-09 07:16
Messages (2)
msg337560 - (view) Author: Akash Shende (akash0x53) * Date: 2019-03-09 07:10
Currently lot of code still uses old placeholder and .format() methods for formatting the string. Lets convert them all to f-string

"%s" % (name) => f'{name}'
"{name}".format(name="yoyo") = > f'{name}'
msg337561 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2019-03-09 07:20
New code might use f-strings as needed but refactoring old code just for f-strings could result in large change that pollutes git history. Generally large refactorings like this are rejected like making all code PEP 8 compatible is another example. If there is a case by case basis with adequate benchmark and reason then it might have a chance to be accepted by the module author.

Thanks
History
Date User Action Args
2019-03-09 07:31:44serhiy.storchakasetstatus: open -> closed
resolution: rejected
stage: patch review -> resolved
2019-03-09 07:20:41xtreaksetnosy: + xtreak
messages: + msg337561
2019-03-09 07:16:42akash0x53setkeywords: + patch
stage: patch review
pull_requests: + pull_request12237
2019-03-09 07:10:25akash0x53create