f-string

Steve D'Aprano steve+python at pearwood.info
Tue Dec 5 18:16:26 EST 2017


Anyone got a handy copy of Python 3.6 available to test something for me?

What does compile('f"{spam} {eggs}"', '', 'single') return?

What does eval()'ing the above compiled object do? If necessary, you may have
to define spam and eggs first.


Thanks in advance.


--
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