Transcrypt
Transcrypt copied to clipboard
Can't compile curly braces in format string
This expression can't compile and results in an aborted file:
s = 'foo'
f'{{{s}}}'
In Python this results in literal curly braces around the formatted variable:
>>> s = 'foo'
>>> f'{{{s}}}'
'{foo}'
Of course, a workaround is pretty trivial, but I thought it was interesting.