This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JelleZijlstra
Recipients JelleZijlstra, barry, eric.smith, martin.panter, python-dev, yselivanov
Date 2015-09-12.20:34:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1442090065.29.0.178963018563.issue24965@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks! Here are a few more cases I came across with the existing implementation:

>>> f"{'a\\'b'}"
  File "<stdin>", line 1
SyntaxError: missing '}' in format string expression

I believe this is valid and should produce "a'b".

>>> f"{x!s!s}"
  File "<stdin>", line 1
SyntaxError: single '}' encountered in format string

Could use a better error message.

>>> x = 3
>>> f"{x!s{y}}"
'3y}'

Not sure how this happened.
History
Date User Action Args
2015-09-12 20:34:25JelleZijlstrasetrecipients: + JelleZijlstra, barry, eric.smith, python-dev, martin.panter, yselivanov
2015-09-12 20:34:25JelleZijlstrasetmessageid: <1442090065.29.0.178963018563.issue24965@psf.upfronthosting.co.za>
2015-09-12 20:34:25JelleZijlstralinkissue24965 messages
2015-09-12 20:34:25JelleZijlstracreate