[Python-ideas] Briefer string format

Sven R. Kunze srkunze at mail.de
Mon Aug 3 17:14:56 CEST 2015


Maybe, it's just me but looking at the Zen of Python: "There should be 
one-- and preferably only one --obvious way to do it." it doesn't seem 
to be right to have both of them.

On 03.08.2015 04:43, Eric V. Smith wrote:
> On 8/2/2015 4:56 PM, Sven R. Kunze wrote:
>> On 01.08.2015 19:43, Eric V. Smith wrote:
>>> Should we support !s and !r, like str.format does? It's not really
>>> needed, since with f-strings you can just call str or repr yourself:
>> Just to get a proper understanding here:
>>
>> What is the recommended usage? repr and str or !r and !s?
> They're equivalent, so it wouldn't matter. I'd probably use !r and !s,
> myself.
>
> Eric.
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/



More information about the Python-ideas mailing list