[Python-ideas] String interpolation for all literal strings

Emile van Sebille emile at fenx.com
Fri Aug 7 22:34:32 CEST 2015


On 8/7/2015 12:17 PM, Yury Selivanov wrote:
> Yes.  And overall I think that
>
>      sum = a + b
>      print(f'the sum is {sum}')
>
> is more pythonic (readability, explicitness etc) than this:
>
>      print(f'the sum is {a + b}')

except for your choice of 'sum' I'd agree. Otherwise shadowing builtins 
doesn't do any of these.


Emile




More information about the Python-ideas mailing list