Jelle Zijlstra added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24965>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com