Eric V. Smith <e...@trueblade.com> added the comment:
Because of the backward compatibility issues, I'm not going to change the f-string parser for this. We'll just need to document the requirements for using parens if you want to use :=. This is similar to the existing documentation about lambdas and f-strings in https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals Patches welcome! To be clear: like lambdas, this is just limitation of embedding expressions inside strings, and it's also a limitation because format specs can start with equal signs. It's not a restriction because I think f-strings shouldn't contain "top-level" := expressions. ---------- assignee: eric.smith -> components: +Documentation -Interpreter Core priority: release blocker -> normal _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36798> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com