Bug or intended behavior?
Steve D'Aprano
steve+python at pearwood.info
Tue Jun 6 19:28:53 EDT 2017
On Wed, 7 Jun 2017 03:16 am, Terry Reedy wrote:
>> Personally I prefer a less compact but more explicit alternative:
>>
>> "foo {}".format(1-2)
>
> More compact:
> >>> f'foo {1-2}'
> 'foo -1'
Also more mysterious and magical, and not backwards compatible.
"Good news everybody! We have something which looks like a string literal but is
actually eval() in disguise!"
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
More information about the Python-list
mailing list