Sebastian Linke <[email protected]> added the comment:
The same behavior applies to f'{spam[}' and f'{spam(}'. Also to f'{spam{}', but
that might be expected.
This message is more clear:
>>> f'{spam('
File "<stdin>", line 1
SyntaxError: f-string: mismatched '(', '{', or '['
Perhaps you want to apply that to the above error cases. Then you wouldn't have
to catch any type of bracket. :-)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35494>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com