[New-bugs-announce] [issue32157] Remove explicit quotes around %r and {!r}

Serhiy Storchaka report at bugs.python.org
Tue Nov 28 12:17:54 EST 2017


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

It is common to use quotes around %s. If the formatted argument is a string this will produce a string in qoutes, that look as a string literal in Python and other programming languages or just as a quoted string in English. But if quotes surround %r this looks like error. If the argument is a string this will lead to doubling qoutes. If its repr is in the form <...>, the angular parenthesis serve a role of qoutes, and additional qoutes are not needed.

PR 4582 removes qoutes around %r and {!r} in format strings.

----------
components: Library (Lib)
messages: 307146
nosy: barry, davin, pitrou, r.david.murray, serhiy.storchaka, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Remove explicit quotes around %r and {!r}
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32157>
_______________________________________


More information about the New-bugs-announce mailing list